.NETGURU
XMLDataDocument
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngxml' list.


renevazquez@cimex.com.cu
Hi, I have a XMLDataDocument that I Synchronize to a Dataset in this
way:

dsPart dsTemp = new dsPart(); //dsPart is a typed dataset that is
defined in another place

XmlDataDocument doc = new XmlDataDocument(dsTemp);

doc.LoadXml("<Table><partNo>x2</partNo><descr>Procesador</descr><price
>100</price><ret>true</ret><sentaiCode>345</sentaiCode></Table>");

note:

as the msdn says when I load the xml into the XMLDataDocument the
dataset is syncchronized with the XMLDataDocument and I can get the
relational representation of the xml data through the dataset
property:

in this case doc.DataSet

but my dataset is empty, and there is no error..

if anyone have a answer for this the help would be extremely
appreciated.

Thanks a Lot in Advance.

Reply to this message...
 
    
Jason Zhu
It is likely that the dataset schema is not consistent with the xml file
you are loading into XmlDataDocument.
If you send me the schema for dsTemp, I will tell you what is happening.
Jason

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]=20
Sent: Tuesday, June 18, 2002 11:24 AM
To: aspngxml
Subject: [aspngxml] XMLDataDocument

Hi, I have a XMLDataDocument that I Synchronize to a Dataset in
this=20
way:
=20
dsPart dsTemp =3D new dsPart(); //dsPart is a typed dataset that is =

defined in another place
=20
XmlDataDocument doc =3D new XmlDataDocument(dsTemp);
=20
=20
=20
=20
doc.LoadXml("<Table><partNo>x2</partNo><descr>Procesador</descr><price
>100</price><ret>true</ret><sentaiCode>345</sentaiCode></Table>");
=20
=20
note:=20
=20
as the msdn says when I load the xml into the XMLDataDocument the=20
dataset is syncchronized with the XMLDataDocument and I can get the

relational representation of the xml data through the dataset=20
property:
=20
in this case doc.DataSet
=20
but my dataset is empty, and there is no error..
=20
if anyone have a answer for this the help would be extremely=20
appreciated.
=20
=20
Thanks a Lot in Advance.

| [aspngxml] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngxml.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
renevazquez@cimex.com.cu
hi, thanks a lot, here is the schema:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="dsPart" targetNamespace="http://tempuri.org/dsPart.xsd";
elementFormDefault="qualified" xmlns="http://tempuri.org/dsPart.xsd";
xmlns:mstns="http://tempuri.org/dsPart.xsd";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified">
<xs:element name="dsPart">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Part">
<xs:complexType>
<xs:sequence>
<xs:element
name="partNo" type="xs:string" />
<xs:element
name="descr" type="xs:string" />
<xs:element
name="price" type="xs:decimal" />
<xs:element
name="ret" type="xs:boolean" />
<xs:element
name="sentaiCode" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:key name="partNo" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Part" />
<xs:field xpath="mstns:partNo" />
</xs:key>
</xs:element>
</xs:schema>

***also if you know why after i fill the dataset from the database and
output the xml inside it i obtain this:
<Table><partNo>x2</partNo><descr>Procesador</descr><price
>100</price><ret>true</ret><sentaiCode>345</sentaiCode></Table>

instead of what I spect according to the schema:
<Part><partNo>x2</partNo><descr>Procesador</descr><price
>100</price><ret>true</ret><sentaiCode>345</sentaiCode></Part>

______________________________ Reply Separator _________________________________
Subject: [aspngxml] RE: XMLDataDocument
Author: "aspngxml" <Click here to reveal e-mail address> at INTERNET-MAIL
Date: 18/06/2002 14:17

It is likely that the dataset schema is not consistent with the xml file
you are loading into XmlDataDocument.
If you send me the schema for dsTemp, I will tell you what is happening.
Jason

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]
Sent: Tuesday, June 18, 2002 11:24 AM
To: aspngxml
Subject: [aspngxml] XMLDataDocument

Hi, I have a XMLDataDocument that I Synchronize to a Dataset in
this
way:

dsPart dsTemp = new dsPart(); //dsPart is a typed dataset that is
defined in another place

XmlDataDocument doc = new XmlDataDocument(dsTemp);

doc.LoadXml("<Table><partNo>x2</partNo><descr>Procesador</descr><price
>100</price><ret>true</ret><sentaiCode>345</sentaiCode></Table>");

note:

as the msdn says when I load the xml into the XMLDataDocument the
dataset is syncchronized with the XMLDataDocument and I can get the

relational representation of the xml data through the dataset
property:

in this case doc.DataSet

but my dataset is empty, and there is no error..

if anyone have a answer for this the help would be extremely
appreciated.

Thanks a Lot in Advance.

| [aspngxml] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngxml.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngxml] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngxml.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 
System.Xml.XmlDataDocument




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification