G
Guest
I am unable to select a specific XmlElement from my xml document. I have an
xml file with the following data:
<?xml version="1.0" encoding="utf-8"?>
<my_data>
<dogs>
<dog id="benji" breed="mutt">
<dog id="Lassie" breed="collie">
</dogs>
</my_data>
If I create an XmlDataSource using the xml file the following line of code
will return null. How can I get this to work?
XmlElement myDog = MyXmlDataSource.GetXmlDocument().GetElementById("benji");
xml file with the following data:
<?xml version="1.0" encoding="utf-8"?>
<my_data>
<dogs>
<dog id="benji" breed="mutt">
<dog id="Lassie" breed="collie">
</dogs>
</my_data>
If I create an XmlDataSource using the xml file the following line of code
will return null. How can I get this to work?
XmlElement myDog = MyXmlDataSource.GetXmlDocument().GetElementById("benji");