lytung818
asked on
exporting xml from dataset
Is this xml format possible to create from a dataset writeXML method? I haven't been able to create multiple tables to look like this:
<document>
<employee>
<name>
<lastname>Kelly</lastname>
<firstname>Grace</firstnam e>
</name>
<hiredate>October 15, 2005</hiredate>
<projects>
<project>
<product>Printer</product>
<id>111</id>
<price>$111.00</price>
</project>
<project>
<product>Laptop</product>
<id>222</id>
<price>$989.00</price>
</project>
</projects>
</employee>
</document>
<document>
<employee>
<name>
<lastname>Kelly</lastname>
<firstname>Grace</firstnam
</name>
<hiredate>October 15, 2005</hiredate>
<projects>
<project>
<product>Printer</product>
<id>111</id>
<price>$111.00</price>
</project>
<project>
<product>Laptop</product>
<id>222</id>
<price>$989.00</price>
</project>
</projects>
</employee>
</document>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It defines the relationship between the tables within the dataset
What error are you getting?
What error are you getting?
ASKER
NO error. I just needed an example on how this would work. I tried it and it woked fine, however i dont want to hardcode the rows.
ASKER
Dim i As Integer = intCounter
Dim rowName As DataRow
rowName = Table2.NewRow()
rowName.Item(intCounter) = datafield
Table2.Rows.Add(rowName)
intCounter = intCounter + 1
also, what do the relations do?