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.
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