C
Corey Wirun
Hi All,
I'm building an XmlDataDocument list this:
XmlDataDocument xmlDocResults = new XmlDataDocument( dsResults );
XmlNodeList nodes1 = xmlDocResults.SelectNodes(
"//RPDCY_TDataSet/RPDCY_T" );
No matter what XPath expression I put in the SelectNodes, I get a NodeList
back (i.e not null), but it's always Count = 0. Thinking something was
wrong with my DataSet, I 'dumped' it to a XML file so I could load it up in
XMLSpy and try the XPath same expression:
dsResults.WriteXml( @"e:\temp\ResultDataSet.xml" ) gives me:
<?xml version="1.0" standalone="yes"?>
<RPDCY_TDataSet xmlns="http://tempuri.org/RPDCY_TDataSet.xsd">
<RPDCY_T>
<DBINDEX>10001</DBINDEX>
<TAG>FI01002</TAG>
<DESCRIPT>Crude Unit Offgas to Sats Gas Unit</DESCRIPT>
<OFFSET>15</OFFSET>
<CORY>0</CORY>
<SRC_DBINDEX>10000</SRC_DBINDEX>
</RPDCY_T>
...
</RPDCY_TDataSet>
My XPath expression worked in XMLSpy - got a node list back. I also had a
look at xmlDocResults.InnerXml and sure enough, I saw the same XML.
So then I wrote a little subroutine that dumps out all the tables and rows -
all the rows have a row status as 'Unmodified'. So that can't be it.
Can anyone give me a little insight as to what is happening here? I've got
other XmlDataDoc's floating around, but I don't see this problem anywhere
else.
Thanks in Advance!
Corey.
I'm building an XmlDataDocument list this:
XmlDataDocument xmlDocResults = new XmlDataDocument( dsResults );
XmlNodeList nodes1 = xmlDocResults.SelectNodes(
"//RPDCY_TDataSet/RPDCY_T" );
No matter what XPath expression I put in the SelectNodes, I get a NodeList
back (i.e not null), but it's always Count = 0. Thinking something was
wrong with my DataSet, I 'dumped' it to a XML file so I could load it up in
XMLSpy and try the XPath same expression:
dsResults.WriteXml( @"e:\temp\ResultDataSet.xml" ) gives me:
<?xml version="1.0" standalone="yes"?>
<RPDCY_TDataSet xmlns="http://tempuri.org/RPDCY_TDataSet.xsd">
<RPDCY_T>
<DBINDEX>10001</DBINDEX>
<TAG>FI01002</TAG>
<DESCRIPT>Crude Unit Offgas to Sats Gas Unit</DESCRIPT>
<OFFSET>15</OFFSET>
<CORY>0</CORY>
<SRC_DBINDEX>10000</SRC_DBINDEX>
</RPDCY_T>
...
</RPDCY_TDataSet>
My XPath expression worked in XMLSpy - got a node list back. I also had a
look at xmlDocResults.InnerXml and sure enough, I saw the same XML.
So then I wrote a little subroutine that dumps out all the tables and rows -
all the rows have a row status as 'Unmodified'. So that can't be it.
Can anyone give me a little insight as to what is happening here? I've got
other XmlDataDoc's floating around, but I don't see this problem anywhere
else.
Thanks in Advance!
Corey.