Re: XMLParserBuffer returns no element found!!!
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
On 22 Aug, Michael B Allen wrote: > On Wed, 23 Aug 2006 07:27:50 +0530 > [email protected] wrote: > >> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> xmlfile.xml contains >> >> <config> >> <builddate>2006-11-23</builddate> >> </config> >> >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > That's not a valid XML file. An XML file always begins with the <?xml > version="1.0"?> processing instruction. This is not right. An XML file does not always have to begin with the XML Declaration. See the production 22 of the XML recommendation http://www.w3.org/TR/2004/REC-xml-20040204/#NT-prolog If you encode your XML files in another encoding then UTF-8 you must have an XML Declaration with the right Encoding Declaration, sure. But if your XML data is encoded in UTF-8 - which is a good idea - you can omit the XML Declaration and every compliant parser will grok your document. rolf