Click to See Complete Forum and Search --> : XML Parse into PHP


cjbeck71081
04-03-2007, 11:18 AM
I think what i want to do should be simple but there is a part of the XML structure i havent seen before. What i would like to do is, take data from an XML file and insert it into HTML.

Here is the XML code:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<VINquery Version="1.0.0" Report_Type="EXTENDED" Date="4/3/2007">
<VIN Number="WAULD64B14N024605" Status="SUCCESS">
<Vehicle VINquery_Vehicle_ID="26985" Model_Year="2004" Make="Audi" Model="A6" Trim_Level="2.7T">
<Item Key="VINquery_Vehicle_ID" Value="26985" Unit="" />
<Item Key="Model Year" Value="2004" Unit="" />
<Item Key="Make" Value="Audi" Unit="" />
<Item Key="Model" Value="A6" Unit="" />
<Item Key="Trim Level" Value="2.7T" Unit="" />
<Item Key="Manufactured in" Value="GERMANY" Unit="" />
<Item Key="Production Seq. Number" Value="024605" Unit="" />
<Item Key="Body Style" Value="SEDAN 4-DR" Unit="" />
<Item Key="Engine Type" Value="2.7L V6 DOHC" Unit="" />
</Vehicle>
</VIN>
</VINquery>

Now if i was able to put into a simple HTML file like

<html>

<xml src="file.xml" id="xmldso></xml>

<body>

<table
datasrc="#xmldso"
width="100%"
border="1">

<thead>
<th>Model Year</th>
<th>Make</th>
<th>Model</th>
</thead>

<tr align="left">
<td><span datafld="Model Year"></span></td>
<td><span datafld="Make"></span></td>
<td><span datafld="Model"></span></td>
</tr>
</table>

</body>
</html>


Any help is greatly appreciated.

Thank You