Technology Programming

How to Select XML Type Sub-Nodes in ASP

    • 1). Use the XMLDocument object to upload your XML file into the Document Object Model on your ASP.NET site. Find this through the file server at System.xml. Once you upload the XML file, it will now be called "XML Document" on the DOM system.

    • 2). Open XML Document and type in the function "Dim EmployeeList as XmlNodeList

      EmployeeList = XMLDocument.SelectNodes("/parentnode/childnode")" at the bottom of the node list. This is the Select Nodes() function; it will allow you to select all of the sub-nodes of a single node list. Insert the name of the node where it says "parentnode" and the name of the group of sub-nodes where it says "childnode."This will create an XMLNodeList.

    • 3). Save the XMLNodeList. Run this list in ASP.NET to view an ASP script of the selected XML sub-nodes.

Leave a reply