473,403 Members | 2,366 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,403 software developers and data experts.

ReadXml() producing different DataSets on different machines

RM
I have a simple XML file, the contents of which are below. I have
validated this XML file with Microsofts online validator and it
validates successfully.

I .ReadXml() this data into a DataSet in C#.NET
On about 2/3 the machines I try this on I get a DataSet constructed of 2
tables, appropriate type columes and ROWS OF DATA from the XML.
On about 1/3 the machines I try this on I get a DataSet constructed of 2
tables, appropriate type columes and 0 ROWS OF DATA. Just empty tables.

Wth?

I cannot find any rhyme or reason to the machines' setups to account for
this. Works on some XP's, not others. Works on some Windows 2000's, not
others. I have 2 Windows 2000 machines in particular that are nearly
identical from all I can tell... .NET 1.1, latest XML parser, latest
MDAC, yet .ReadXml() produces a built and populated dataset on one
machine, and a built but no-row dataset on the other.

Frustrating.

Here's the XML.

<?xml version="1.0"?>

<root xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:a="urn:Config">

<!-- schema starts here -->
<xs:schema targetNamespace='urn:Config'>
<xs:element name='Config'>
<xs:complexType>
<xs:sequence>
<xs:element name="ObServerConfig">
<xs:complexType>
<xs:sequence>
<xs:element name='mailServerIp' type='xs:string' />
<xs:element name='mailFrom' type='xs:string' />
<xs:element name='timeOut' type='xs:integer' />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="server" maxOccurs='unbounded'>
<xs:complexType>
<xs:sequence>
<xs:element name='url' type='xs:string' />
<xs:element name='email' type='xs:string' />
<xs:element name='enabled' type='xs:boolean' />
<xs:element name='notify'>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="up|down|both" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<!-- schema ends here -->

<!-- configuration XML starts here -->
<a:Config>
<ObServerConfig>
<mailServerIp>127.0.0.1</mailServerIp>
<mailFrom>me@here.com</mailFrom>
<timeOut>5</timeOut>
</ObServerConfig>
<server>
<url>http://www.cnn.com</url>
<email>te**@nowhere.com</email>
<enabled>true</enabled>
<notify>down</notify>
</server>
<server>
<url>http://www.yahoo.com</url>
<email>so*****@there.com</email>
<enabled>true</enabled>
<notify>both</notify>
</server>
</a:Config>
<!-- configuration XML ends here -->

</root>

Nov 12 '05 #1
0 1135

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

Similar topics

11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
1
by: RM | last post by:
I am using DataSet's .ReadXml() method to parse an XML file that has an inline schema and Im getting "different" results on various machines using the same myDataSet.ReadXml("myExample.xml"). ...
8
by: Nikhilesh Mehendale | last post by:
I have written a web service in C#, .NET 1.1 which reads a XML file into a dataset. This is just a plain XML file. First I use the Dataset.ReadXmlScheme function and pass the XML file to it. Then...
2
by: bfrasca | last post by:
I have a well-formed XML file that I am trying to load into a dataset using the ReadXML method. It keeps telling me that "there are multiple root elements". I can view the data using XML Designer...
3
by: Steve | last post by:
I've run across an issue that I'm trying to work around. I take that back, I have a work around but I'm looking to see if anyone has a fix for it. The issue is that when loading a Boolean into a...
3
by: George Durzi | last post by:
If I try to read a CNET.com RSS feed into a DataSet, I get the following exception The same table (category) cannot be the child table in two nested relations. The exception is thrown...
10
by: webmaster | last post by:
Getting error: Illegal characters in path what's wrong with this? string xmlSR = "<XmlDS><table1><phone>Value1</phone><name>jake</name></table1></XmlDS>"; myDataSet.ReadXml(xmlSR,...
1
by: Angel \Java\ Lopez | last post by:
Hi people! I'm running a Visual Studio 2005, Professional, on Windows XP Professional. I've found a little big problem, reading a DataSet. If I try: ds.ReadXml("c:\data.xml") it raises...
0
by: Arto Viitanen | last post by:
I am using WriteXML/ReadXml pair to save DataSet for later use. DataSet is built by reading textfiles and storing their data to different DataTables. Each file contains several complex values, that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.