![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XPath data model and the XML Declaration [Thread Next] Re: XPath data model and the XML DeclarationTo: NULL Date: 12/2/2004 12:42:00 PM Does the XML Declaration map to a Xpath node type or not. If yes - what type of node? No, it affects the parser (eg telling it what encoding has been used), and so affects the construction of the node tree, but no record of the declaration is left in the node set. That's (normally) what you want. If you have a file in latin1 that starts <?xml version="1.0" encoding="iso-8859-1"?> .. and the same data encoded in utf-8 that starts <?xml version="1.0" encoding="utf-8"?> Then you want these two to be equivalent. The actual data in the nodes are just logical unicode characters, the encoding used to store them originally in a file shouldn't be relevant to the logical view of the XML tree (and isn't available to XPath/XSLT). Of course in many cases it's not unrreasonable to want to output a file with the same encoding as was used for input, but that information has gone, along with information about whether " or ' was used for attributes, or where CDATA sections were, etc. David | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
