NEWBIE: How to script XML data in ASP.NET

liunx

Guest
I'm a complete newbie to ASP.NET, so please bare with me:

I have an ASP.NET page that pulls in XML data from 2 source files, and it works great. Now I'd like to use data from each of those files to compare properties, and give the appropriate result depending on those properties.

For instance, if the 1st XML file contains a list of forms for our organization, and they include an element titled "<dept>", like this:
<!--(XML_doc1)-->
<formsdocs>
<form>
<title>FORMNAME</title>
<url>URL</url>
<dept>ad</dept>
</form>
</formsdocs>

...and the 2nd XML file contains a list of departments, and each has an "<id>" element that matches the first XML file, like this:
<!--(XML_doc2)-->
<dept_div>
<administration>
<title>Administration</title>
<id>ad</id>
</administration>
...
</dept_div>

...how should I go about displaying "Administration" if the <id> is "ad", like this:
If XML_doc1.dept = XML_doc2.id Then
newdept = XML_doc2.title
End If

I hope this makes sense, and I hope that someone can help me out with this. Thanks in advance.
 
Back
Top