Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Display all node names and values

From: BrentD@-----------.---------.---
To: NULL
Date: 9/3/2007 9:32:00 AM

Hello,

Using Asp.Net, does anyone have some sample code that will simply display 
all of the node names and values in an XML file?  For example:

XML File:
<?xml verision="1.0" encoding="utf-8"?>
<root>
  <node1>value 1</node1>
  <list>
     <node2>value 2</node2>
     <node3>value 3</node3>
  </list>
  <node4>value 4</node4>
</root>

The output would display:

root
  node1 = value 1
  list
     node2 = value 2
     node3 = value 3
  node4 = value4

The indentation is not really important, all I want is code to extract each 
node name and if a value is present for that node, then show the value as 
well.

I have not been able to find any sample code that does this simple operation 
using ASP.Net XML classes.

Thanks in Advance!


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent