<asp:XmlDataSource ID="MyDataSet" runat="server" XPath="/items/item"> <Data> <items> <item desc="field_one" val="some value" /> <item desc="field_two" val="escape invalid chars" /> <item desc="field_three" val="vals can by any type just put them line like a string" /> <item desc="field_four" val="And so on, and so on, and so on" /> </items> </Data> </asp:XmlDataSource>
To databind xmlsources to grids, you want the data to be laid out more like this
<asp:XmlDataSource ID="MyDataSet" runat="server" XPath="/items/item"> <Data> <items> <item field_one="some value" field_two="escape invalid chars" field_three="vals can by any type just put them lin like a string" field_four="And so on, and so on, and so on" /> <item field_one="some other value" field_two="escape invalid chars" field_three="vals can by any type just put them lin like a string" field_four="And so on, and so on, and so on" /> </items> </Data> </asp:XmlDataSource>
No comments:
Post a Comment