Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML, XSL and a question

Status
Not open for further replies.

WiseNewbie

Programmer
Jan 9, 2004
45
AU
Hi,

I'm using an example posted here:

to write my own XML/XSL based page using ASP.NET however i have some questions regarding this.

I'm doing a project for a technical book library and they want their books to be in XML format for ease and yadda yadda, but they are in specific categories (say like VB, .NET, ASP etc) so i thought of writing the XML file as so:

<Books>
<Book type=&quot;VB&quot;>
<Title>Blah</title>
<categories>
<Category>
<Name>BASIC</name>
<Name>Visual Basic</name>
</category>
</categories>
</Book>
<Book type=&quot;C++&quot;>
<Title>Blah</title>
</Book>
</Books>

Now my code is identical to that on the site with some changes to make the above XML file work. I was wondering if i can only display certain parts of the XML file instead of all, say just VB books or just C++ and optionally ALL books... and if so how?

theres also a different way of doing this:

<Books>
<VB>
<Book>
<Title>Blah</title>
<categories>
<Category>
<Name>BASIC</name>
<Name>Visual Basic</name>
</category>
</categories>
</Book>
</VB>
<C++>
<Book>
<Title>Blah</title>
</Book>
</C++>
</Books>

Whichever i can workout i'll use... i personally prefer the latter.

Thanks,

emily
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top