473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Invalid carachter loading xml

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 <Tablenodes for "PIPPO" and "PLUTO".

Any help appreciated.

Best regards.

--
fabri
MKDS: Joker® - <waiting for ds lite...>
AC:Fabrizio, Kanoemi, 1890 4700 1546
Tetris DS: 748422 559210
Jul 3 '06 #1
1 1175
Fabri wrote:
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));

--
Oleg Tkachenko [XML MVP, MCPD]
http://blog.tkachenko.com | http://www.XmlLab.Net | http://www.XLinq.Net
Jul 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Atanas Boev | last post by:
Is there any CSS way to make a <hr /> noshadow so I don't get the default 3D look in Netscape? I tried to use some border-bottom to make the line, but my "line" should be under text that is...
0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
0
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
2
by: Brad | last post by:
I have an intranet app that has just started sporadically getting the following error "The viewstate is invalid for this page and might be corrupted." By sproadic I mean 3-4 times during the past...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
1
by: dayspook | last post by:
When loading an online form I get the following: Server Error in '/' Application Exception Details: System.ArgumentException: Invalid SecureString Source Error: An unhandled exception was...
3
by: Arnold | last post by:
I am having problem loading the image from the database. It gives this error: "Invalid parameter used." This is my source code: Private abyt() As Byte Private fo As New OpenFileDialog Private sf...
1
by: Stanimir Stamenkov | last post by:
This is an issue I've got using the Xerces-J 2.7.1 release when loading the following schema: <?xml version="1.0" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element...
1
by: sachinv1821 | last post by:
hi all , i am getting this Problem i am Unable to Load the DLL/ACM, the Problem with this (DLL /ACM ) is its a C code but this DLL using the C++ library i written a wrapper for C++ library and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.