Jo_Miracle
Technical User
I am a newbie in programming and I'm trying to display metadata of some files using C#.Net.It is a web application intended to be hosted on our office intranet. I have been using Visual Studio 2017 with .NET framework version 4.6.1.
I have created several xml files for meta data and placed a TreeView web server control in my design page.Can you please tell me a way to populate the TreeView control from the xml files. A sample xml code is given below.
The above xml should be displayed as a tree strcture as :
Identification Information:
Citation:
Citation Information:
Originator: Jay Diffendorfer
Originator: Roger Compton
Originator: Louisa Kramer
Originator: Zach Ancona
Originator: Donna Norton
Published Date: 2014 02
Title: Onshore Industrial Wind Turbine Locations for the United States through July 2013
Geoform:Maps and Data - vector digital data
Publication Information:
Published Place: Denver, CO
Published by: United States Geological Survey (USGS)
Online Link: and
I have created several xml files for meta data and placed a TreeView web server control in my design page.Can you please tell me a way to populate the TreeView control from the xml files. A sample xml code is given below.
XML:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<idinfo>
<citation>
<citeinfo>
<origin>Jay Diffendorfer</origin>
<origin>Roger Compton</origin>
<origin>Louisa Kramer</origin>
<origin>Zach Ancona</origin>
<origin>Donna Norton</origin>
<pubdate>201402</pubdate>
<title>Onshore Industrial Wind Turbine Locations for the United States through July 2013</title>
<geoform>Maps and Data - vector digital data</geoform>
<pubinfo>
<pubplace>Denver, CO</pubplace>
<publish>United States Geological Survey (USGS)</publish>
</pubinfo>
<onlink>[URL unfurl="true"]http://dx.doi.org/10.3133/ds817[/URL] and[URL unfurl="true"]http://eerscmap.er.usgs.gov/windfarm/</onlink>[/URL]
</citeinfo>
</citation>
</idinfo>
</metadata>
The above xml should be displayed as a tree strcture as :
Identification Information:
Citation:
Citation Information:
Originator: Jay Diffendorfer
Originator: Roger Compton
Originator: Louisa Kramer
Originator: Zach Ancona
Originator: Donna Norton
Published Date: 2014 02
Title: Onshore Industrial Wind Turbine Locations for the United States through July 2013
Geoform:Maps and Data - vector digital data
Publication Information:
Published Place: Denver, CO
Published by: United States Geological Survey (USGS)
Online Link: and