Efitap
April 14th, 2008, 01:04 AM
Forgive me if this has already been answered, I've searched on various terms, but it is difficult to formulate the problem properly, and the search results have not given me anything that I can work with yet, so I ask here.
given the xml
<?xml version="1.0" encoding="UTF-8"?>
<Persons>
<Person>
<Name>Papa</Name>
<ShoeNumber>43</ShoeNumber>
</Person>
<Person>
<Name>Neo</Name>
<ShoeNumber>43</ShoeNumber>
</Person>
<Person>
<Name>Andersson</Name>
<ShoeNumber>47</ShoeNumber>
<Profession>Shark</Profession>
</Person>
</Persons>
I have two challenges:
1) I cannot connect this XML directly to a dataGrid using a data binder object as I can with an SqlDataSource. The problem seems to be that the xml does not contain attribute values, rather, it has text node values, such as <Name>someone</Name> instead of <Person name="someone" />
First question is: Did I miss something during my xml reading, or is this a limitation from Microsoft's part?
2) I would like to make a web application where a user can upload an xml log and get reasonable information back from it, but there is a catch! The xml export that the user is uploading (xml report from SeaPine TestTrack if you know it) does not always contain all possible node values, as is the example with person xml above, I have intentionally only included the node "Profession" on the last Person node. Now, still in the spirit of attempting to use XmlDataObject, databinder, and datagrid, is it at all possible to accomplish this with basically the drag-n-drop functionality that the SQL objects support?
given the xml
<?xml version="1.0" encoding="UTF-8"?>
<Persons>
<Person>
<Name>Papa</Name>
<ShoeNumber>43</ShoeNumber>
</Person>
<Person>
<Name>Neo</Name>
<ShoeNumber>43</ShoeNumber>
</Person>
<Person>
<Name>Andersson</Name>
<ShoeNumber>47</ShoeNumber>
<Profession>Shark</Profession>
</Person>
</Persons>
I have two challenges:
1) I cannot connect this XML directly to a dataGrid using a data binder object as I can with an SqlDataSource. The problem seems to be that the xml does not contain attribute values, rather, it has text node values, such as <Name>someone</Name> instead of <Person name="someone" />
First question is: Did I miss something during my xml reading, or is this a limitation from Microsoft's part?
2) I would like to make a web application where a user can upload an xml log and get reasonable information back from it, but there is a catch! The xml export that the user is uploading (xml report from SeaPine TestTrack if you know it) does not always contain all possible node values, as is the example with person xml above, I have intentionally only included the node "Profession" on the last Person node. Now, still in the spirit of attempting to use XmlDataObject, databinder, and datagrid, is it at all possible to accomplish this with basically the drag-n-drop functionality that the SQL objects support?