Hello microsoft.public.dotnet.xml!
I need to parse some 'jabber xml' (www.jabber.org). I opted for using
System.Xml.XmxDocument. The sample 'jabber xml' goes here:
<message xmlns='jabber:client' fr********@server.com/user1'
xml:lang='pl' type='groupchat' to*******@server.com/res'>
<body xmlns:xml='http://www.w3.org/XML/1998/namespace'>
MESSAGE TEXT
</body>
<x xmlns='jabber:x:delay' fr********@server.com' stamp='20040714T18:17:10'>
ch**@server.com
</x>
</message>
The problem is, that when I try:
doc.LoadXml(xml); // doc is a XmlDocument and xml is a string containing
above code
I get exception: "Namespace qualifiers beginning with 'xml' are reserved
and cannot be used in user-specified namespaces [line and column number
here]"
I also trid to add xml declaration:
doc.LoadXml("<?xml version='1.0' encoding='utf-8' ?>" + xml)
but with the same result.
I'm sure the xml is valid, because IE, VS, and Firefox
(http://www.mozilla.org/products/firefox/) find it valid.
I've been searching web (using google and msdn) for two days, but with
no results.
Mayby there is any way to overcome this problem? Or mayby there is some
other way to parser and validate xml i .net?
I'll be thankful for any information.
Sorry for my English - I'm still learning...
OJO