Hi, i need a little help with an issue with Xml data imported to Datasets
I used the read XML and readSchema methods of the Dataset
the Structure of the XML is this
<?xml version="1.0" encoding="utf-8" ?><Data xmlns="http://tempuri.org/ServiceBeta2.xsd"><ServiceProviders><ServiceProvid er><Id>1</Id><MatchExpresion>LOC</MatchExpresion><NumericMatch>562</NumericMatch><IsParent>False</IsParent><NewtonServiceId>23</NewtonServiceId><Description>Noticias Nacionales</Description><ServiceCategory>Noticias</ServiceCategory><TargetContentProvider>Yagua</TargetContentProvider></ServiceProvider><ServiceProvider><Id>2</Id><MatchExpresion>INT</MatchExpresion><NumericMatch>468</NumericMatch><IsParent>False</IsParent><NewtonServiceId>23</NewtonServiceId><Description>Noticias Internacionales</Description><ServiceCategory>Noticias</ServiceCategory><TargetContentProvider>Yagua</TargetContentProvider></ServiceProvider></ServiceProviders><MssgParts ServiceId="1" TotalParts="1" Option="1"><Part Number="1" Default="" ExpectedValue="LOC">Header</Part><Part Number="2" Default="" ExpectedValue="">MessageType</Part><Part Number="3" Default="" ExpectedValue="">RequestType</Part></MssgParts><MssgParts ServiceId="1" TotalParts="1" Option="2"><Part Number="1" Default="" ExpectedValue="LOC">Header</Part><Part Number="2" Default="" ExpectedValue="TxT">MessageType</Part><Part Number="3" Default="" ExpectedValue="S">RequestType</Part></MssgParts><MssgParts ServiceId="2" TotalParts="3" Option="1"><Part Number="1" Default="" ExpectedValue="">Header</Part><Part Number="2" Default="" ExpectedValue="">MessageType</Part><Part Number="3" Default="" ExpectedValue="">RequestType</Part></MssgParts></Data
now it fills the dataset without problemes i use a dataview to see the results in a VB test App
The problem is that i need to access the Part elements Via the MssgParts Structure.In the datagrid I can Expand Each Item to see the Relation, and the if i Click It it brings the data correspond to each part
How can i do this Programatically. I tried
Sub Tes
Dim DataViewMssgParts As New DataView(MyParser.DataSetServices.Tables("MssgPart s")
Dim DataViewServiceProv As New DataView(MyParser.DataSetServices.Tables("ServiceP rovider")
Dim DataViewParts As New DataView(MyParser.DataSetServices.Tables("Part")
'--Get the datarelation between the 2 table
Dim MyDataRelation As DataRelation = MyParser.DataSetServices.Tables("MssgParts").Child Relations("Part"
Dim MyDataRow, MyChildRow As DataRow
'--Try to get the part data for each mssgparts element
For Each MyDataRow In MyParser.DataSetServices.Tables("MssgParts").Row
Dim ColChildRows() As DataRow = MyDataRow.GetChildRows(MyDataRelation
For Each MyChildRow In ColChildRow
'--Never got her
Me.Rtb_Check.AppendText(MyChildRow.Item(0) & "--" & MyChildRow.Item(1) & ControlChars.CrLf
Nex
Nex
End Su
If somebody has an idea about this i would really appreciate ur help
Thank
VJS