my application recives XML-documents that contain a declaration (I hope that is the proper term), i.e. they start with something like
I now need to get to the encoding-value (not to read the XML but to generate a response with the same encoding).<?xml version="1.0" encoding="UTF-8"?>
I parse the XML with XML::LibXML and access the content with XPath (using XML::LibXML::XPathContext) but I cannot find a way to access the declaration.
According to "XML in a Nutshell" the declaration is not addressable via XPath anyway, so I wonder how to do that (apart from the obious regex-hack).
Many thanks!
In reply to accessing XML-declarations by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |