[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Created: (XMLBEANS-96) XmlDocumentProperties missing version and encoding
From:       <xmlbeans-dev () xml ! apache ! org>
Date:       2004-12-21 10:36:15
Message-ID: 117551989.1103625375384.JavaMail.apache () nagoya
[Download RAW message or body]

XmlDocumentProperties missing version and encoding
--------------------------------------------------

         Key: XMLBEANS-96
         URL: http://nagoya.apache.org/jira/browse/XMLBEANS-96
     Project: XMLBeans
        Type: Bug
    Versions: Version 1.0.3    
 Environment: Windows 2000, jdk 1.4.2_05
    Reporter: Susanna Sjöholm


The version and encoding properties are null in XmlDocumentProperties object after \
parsing a document, although the document begins with an xml declaration including \
version and encoding. 

Example
--------
String xml = ... //string that begins with <?xml version="1.0" encoding="UTF-8" ?>
SomeDocument doc = SomeDocument.Factory.parse(xml); 
XmlDocumentProperties props = doc.documentProperties();
String version = props.getVersion();  //=> should be "1.0" but is null!
String encoding = props.getEncoding(); //=> should be "UTF-8" but is null!

Parsing is ok otherwise and the document can be successfully validated. Only tested \
on 1.0.3.

Is there a workaround? I.e. can version and encoding be retrieved from the XmlObject \
in another way? (I have not managed to retrieve it by using a cursor.)

Also, I think it is an error that the xml declaration is not included when getting \
the xml as a string(e.g. using xmlText()) from a document. I would want the same \
result out as I had before parsing. Related to closed issue XMLBEANS-10.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic