i am using WPF and a slightly unusual xml file which I am trying to use to populate a datagrid. Between the root node and the order node which repeats there are four nodes that are children of the root and appear only at the top that I cannot seem to navigate through to get to the order nodes. If i remove these first four nodes it populates as expected.
This is the xml that does not work:
<evec_api method="quicklook" version="2.0">
<quicklook>
<item>40</item>
<itemname>Megacyte</itemname>
<regions/><hours>360</hours>
<minqty>10001</minqty>
<sell_orders>
<order id="2686762970">
<region>10000002</region>
<station>60003760</station>
<station_name>Jita IV - Moon 4 - Caldari Navy Assembly Plant</station_name>
<security>0.9</security>
<range>32767</range>
<price>2534.98</price>
<vol_remain>750000</vol_remain>
<min_volume>1</min_volume>
<expires>2013-03-13</expires>
<reported_time>12-13 10:54:11</reported_time>
</order>
<order id="2686763351">
<region>10000002</region>
<station>60003760</station>
<station_name>Jita IV - Moon 4 - Caldari Navy Assembly Plant</station_name>
<security>0.9</security>
<range>32767</range>
<price>2545.99</price>
<vol_remain>709273</vol_remain>
<min_volume>1</min_volume>
<expires>2013-03-13</expires>
<reported_time>12-13 10:54:11</reported_time>
</order>
</sell_orders>
</quicklook>
</evec_api>
XAML(that doesn’t work with the above):
<DataGrid x:Name="grid" ItemsSource="{Binding Path=Element
Element[item].Element[itemname].Element[regions].Element[minqty]
.Element[sell_orders].Elements[order]}">
This is the xml minus the first four nodes that does work:
<evec_api method="quicklook" version="2.0">
<quicklook>
<sell_orders>
<order id="2686762970">
<region>10000002</region>
<station>60003760</station>
<station_name>Jita IV - Moon 4 - Caldari Navy Assembly Plant</station_name>
<security>0.9</security>
<range>32767</range>
<price>2534.98</price>
<vol_remain>750000</vol_remain>
<min_volume>1</min_volume>
<expires>2013-03-13</expires>
<reported_time>12-13 10:54:11</reported_time>
</order>
<order id="2686763351">
<region>10000002</region>
<station>60003760</station>
<station_name>Jita IV - Moon 4 - Caldari Navy Assembly Plant</station_name>
<security>0.9</security>
<range>32767</range>
<price>2545.99</price>
<vol_remain>709273</vol_remain>
<min_volume>1</min_volume>
<expires>2013-03-13</expires>
<reported_time>12-13 10:54:11</reported_time>
</order>
</sell_orders>
</quicklook>
</evec_api>
XAML(that works with the xml above):
<DataGrid x:Name="grid" ItemsSource="{Binding Path=Element
[quicklook].Element[sell_orders].Elements[order]}">
Any help would be appreciated.
you dont have to navigate through those not needed tags so your last binding should work for both xmls
good luck