I have a XML file that contains content for an asp.net website. I need the quickest way to find the node and write the elements out to the page. Also how would I get the links section out of it? do I have to loop through them? Example = I need the content for the Home Page, and I have the id=Home in the xml, how do I get the rest of the data to write out to the page in that node between <page id="Home"> and </page>
<?xml version="1.0" encoding="utf-8"?>
<pages>
<page id="Home">
<content>Conten t Text</content>
<H1>H1 Text/H1>
<LogoALT>Alt Text</LogoALT>
<Title>title text/Title>
<Desc>Descripti on Text</Desc>
<KeyWords>keywo rds</KeyWords>
<Links>
<link>
<li>
<a href="Default.a spx">Company< ;/a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">ProductsSe rvices</a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">Industry News</a>
</li>
</link>
</Links>
</page>
<page id="Services">
<content>Conten t Text</content>
<H1>H1 Text/H1>
<LogoALT>Alt Text</LogoALT>
<Title>title text/Title>
<Desc>Descripti on Text</Desc>
<KeyWords>keywo rds</KeyWords>
<Links>
<link>
<li>
<a href="Default.a spx">Company< ;/a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">ProductsSe rvices</a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">Industry News</a>
</li>
</link>
</Links>
</page>
<page id="Contact">
<content>Conten t Text</content>
<H1>H1 Text/H1>
<LogoALT>Alt Text</LogoALT>
<Title>title text/Title>
<Desc>Descripti on Text</Desc>
<KeyWords>keywo rds</KeyWords>
<Links>
<link>
<li>
<a href="Default.a spx">Company< ;/a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">ProductsSe rvices</a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">Industry News</a>
</li>
</link>
</Links>
</page>
</pages>
Thanks for all your help!
Ryan
<?xml version="1.0" encoding="utf-8"?>
<pages>
<page id="Home">
<content>Conten t Text</content>
<H1>H1 Text/H1>
<LogoALT>Alt Text</LogoALT>
<Title>title text/Title>
<Desc>Descripti on Text</Desc>
<KeyWords>keywo rds</KeyWords>
<Links>
<link>
<li>
<a href="Default.a spx">Company< ;/a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">ProductsSe rvices</a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">Industry News</a>
</li>
</link>
</Links>
</page>
<page id="Services">
<content>Conten t Text</content>
<H1>H1 Text/H1>
<LogoALT>Alt Text</LogoALT>
<Title>title text/Title>
<Desc>Descripti on Text</Desc>
<KeyWords>keywo rds</KeyWords>
<Links>
<link>
<li>
<a href="Default.a spx">Company< ;/a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">ProductsSe rvices</a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">Industry News</a>
</li>
</link>
</Links>
</page>
<page id="Contact">
<content>Conten t Text</content>
<H1>H1 Text/H1>
<LogoALT>Alt Text</LogoALT>
<Title>title text/Title>
<Desc>Descripti on Text</Desc>
<KeyWords>keywo rds</KeyWords>
<Links>
<link>
<li>
<a href="Default.a spx">Company< ;/a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">ProductsSe rvices</a>
</li>
</link>
<link>
<li>
<a href="Default.a spx">Industry News</a>
</li>
</link>
</Links>
</page>
</pages>
Thanks for all your help!
Ryan
Comment