Re: Unable to read the XML declaration
From: Martin Honnen (mahotrash_at_yahoo.de)
Date: 10/22/04
- Next message: Siu: "XML AND apostrophe"
- Previous message: The Kiddie: "Unable to read the XML declaration"
- In reply to: The Kiddie: "Unable to read the XML declaration"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 22 Oct 2004 15:39:32 +0200
The Kiddie wrote:
> I am reading a XML document and parsing it into a listbox. I'm juat
> learning XML and i can't find a way to read the Xml declaration
> <?xml version="1.0" encoding="utf-8"?>
> In the debugger I can see that there is a declaration element to the
> XMLDocument, but this not recognised by the compiler. I can get it
> through the parsing the InnerText but surely there is a better way to
> get it than that.
Are you writing your own XML parser or are you using one of the .NET
classes (XmlTextReader, XmlDocument/DOM, XPathDocument)?
XmlTextReader exposes the Encoding, and DOM (in .NET) models the XML
declaration as a node of type XmlDeclaration which has properties
Encoding, Standalone and Version.
-- Martin Honnen http://JavaScript.FAQTs.com/
- Next message: Siu: "XML AND apostrophe"
- Previous message: The Kiddie: "Unable to read the XML declaration"
- In reply to: The Kiddie: "Unable to read the XML declaration"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|