XML Datasource Help

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

I am defenitly missing in setting up an XML datasource.

I have this as an xml datafile:
===
<?xml version="1.0" encoding="utf-8" ?>
<MyData>
<Sizes>
<Size>
<id>1</id>
<Desc>Infant</Desc>
<Age>6 months to 2 years old</Age>
<Width>8.75"</Width>
<Length>11.5"</Length>
<Neck>8.5" - 10.5"</Neck>
</Size>
<Size>
<id>2</id>
<Desc>Toddler</Desc>
<Age>2 years and up</Age>
<Width>9.25"</Width>
<Length>13"</Length>
<Neck>10" - 12"</Neck>
</Size>
</Sizes>
</MyData>
===

I drop an XMLDatasource on the file, and I tell it that my datafile is my
"MyData.xml" file.
Then when I go to my dropdown list, and tell it that my datasource is my
xmlDatasource object, I cannot pick any datafield and datavalue.

Even if I put into the XPath expression, of the XMLDatasource MyData\Sizes

What am I missing...

My goal in the end is to have all my data in this xmlfile so it will look
like this:
<mydata>
<Sizes>
...
</Sizes>
<Colors>
...
</Colors>
..Otherstuff
</mydata>

Thanks,

Miro
 
It seems I can connect to it if my xml is in this layout:
<MyData>
<Sizes>
<Size id="1" Desc="Infant" Age="6 months to 2 years" Width="8.75"
Length="11.5" Neck="8.5 - 10.5" />
<Size id="2" Desc="Toddler" Age="6 months to 2 years" Width="8.75"
Length="11.5" Neck="8.5 - 10.5"/>
</Sizes>
</MyData>

I am not sure why the other format is not working.
 
Back
Top