Project

Profile

Help

Document prolog

Added by Paul Greve about 1 month ago

We use SaxonProcessor::parseXmlFromString() to parse xml source documents in memory. Is there any way to get the prolog information (xml version, encoding and standalone document declaration) from the resultant XdmNode? I could not find a way to do that.


Replies (2)

RE: Document prolog - Added by Martin Honnen about 1 month ago

The XDM data model that XSLT 3/XQuery 3.1 and XPath 3.1 uses does not in any way store/represent that information contained in the XML declaration, it is read by the underlying XML parser but with XPath/XSLT/XQuery or XDM node models tailored to their use there is no way to access that information.

I think Java SAX in some later versions of Java has some support for an event related to the XML declaration but I don't think SaxonC allows you to make explicit use of the Java SAX API.

RE: Document prolog - Added by Paul Greve about 1 month ago

OK. Thanks Martin. We can parse the documents ourselves for that info. I just wanted to check with you guys first as to whether or not it was available via the XdmNode.

    (1-2/2)

    Please register to reply