I'm trying to parse a xml source.
1) I query via webservices one table and obtain this output
================================================================
<?xml version="1.0" encoding="utf-8"?>
<ExecuteReaderResult
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.mysite.com">
<DataSet>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<id>PIPPO</id>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<id>PLUTO</id>
</Table>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
<Error>false</Error>
<ErrorText />
</ExecuteReaderResult>
================================================================
2) I try to read it this way:
Dim reader As New XmlTextReader(OutputXML)
' OutputXML is a string with the xml value above
I obtain "invalid carachter"
Can you point me to some workarounds?
I only have to parse <Table> nodes for "PIPPO" and "PLUTO".
Any help appreciated.
Best regards.

Signature
fabri
MKDS: Joker® - <waiting for ds lite...>
AC:Fabrizio, Kanoemi, 1890 4700 1546
Tetris DS: 748422 559210
Oleg Tkachenko [MVP] - 04 Jul 2006 08:54 GMT
> Dim reader As New XmlTextReader(OutputXML)
>
> ' OutputXML is a string with the xml value above
The argument of the XmlTextReader constructor is XML file path, not XML
content in a string. If you want to read string, use StringReader class:
(C#)
XmlTextReader reader = new XmlTextReader(new StringReader(OutputXML);
or if you are doing .NET 2.0 then
XmlReader reader = XmlReader.Create(new StringReader(OutputXML));

Signature
Oleg Tkachenko [XML MVP, MCPD]
http://blog.tkachenko.com | http://www.XmlLab.Net | http://www.XLinq.Net