1

I'm looking for a way to read in the XML version header using the xml.sax parser in python.

**<?xml version="1.0"?>**
<root>
  <child>Hello</child>
  <child2>World</child>
</root>

So far, whenever I try to read in the XML, it just seems to skip over the header and go to the root node.

Any help would be greatly appreciated.

Thank you.

1 Answer 1

0

I am not sure if this is available in your version of SAX, but the way to get it would be through the Locator2.

http://sax.sourceforge.net/apidoc/org/xml/sax/ext/Locator2.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.