Reading from an XML file

  • Thread starter Thread starter amessimon
  • Start date Start date
A

amessimon

Hi

I need to read from an XML document formatted in this manner

<?xml version="1.0"?>
<result>
<book>
<title>A new book</title>
<url>http://www.newbookstore.co.uk</url>
<description>perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae
ab illo inventore veritatis et quasi </description>
<logo>http://serversomewhere/images23.gif</logo>
</book>
</result>
etc.....

And write the results to the page in this manner

<table cellpadding="0" cellspacing="2" border="0" class="" width="760">
<tr>
<td><img src="http://serversomewhere/images23.gif" alt=""
border="0"></td>
<td><p><b>A new book</b><br>
perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
quae
ab illo inventore veritatis et quasi </p><br>
<a href="http://www.newbookstore.co.uk"></a><br></td>
</tr>
etc.....

I figure i need to load all the data into some kind of container and loop
through it but cant find much information
about how to do this kind of thing. Can anyone point me in the right
direction?

Thanks in advance

Simon Ames
 
Create an XSLT file that creates the output you need. You can then run the
XML and XSLT into an XmlTransform object and get the output. There are
plenty of XSLT tutorials on the web to get you started.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Back
Top