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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML binding question

Status
Not open for further replies.

shredvisions

Technical User
Dec 17, 2009
1
US
Hi,
I'm trying to bind an xml document with an HTML doc. When I go to view it in IE, the table shows up with only the <Name> and <Price> xml tags bound. The images, stockID and Description are mia--- what the heck is going on??

Help will be greatly appreciated

here is my <body> of the HTML doc:
---------------
<body>
<xml id="Clothing" src="clothing.xml"></xml>
<div id="main_wrapper">
<div id="header">
<a href="index.html"></a>
</div>
</div>

<div id="nav">
<div id="nav_inner">
<ul>
<li><h2><a href="../index.html">Home</a></h2></li>
<li><h2 style="background-color:#8F7401;">Products</h2></li>
<li>Clothing</li>
<li><a href="lighting.html">Lighting</a></li>
<li><a href="Blown_Glass.html">Blown Glass</a></li>
<li><a href="Electronics.html">Electronics</a></li>
<li><a href="fun_gifts.html">Fun Gifts</a></li><br />
<li><a href="Order_form.html"><h2>Order Form</h2></a></li>
</ul>
</div>
</div>

<div id="content">
<div id="content_inner">
<h1>Clothing</h1>
<table id="clothes" align="center" datasrc="#Clothing" datafld="Products">
<thead>
<th colspan="2">
<span datasrc="#Clothing" datafld="Name"></span>
</th>
</thead>
<tr>
<th rowspan="3" align="center" width="200">
<a datasrc="#Photo_L"><img datasrc="#Photo_S"></a>
</th>
<th height="200" width="200">
<span datasrc="#Clothing" datafld="#Description"></span>
</th>
</tr>
<tr>
<th >
<span datasrc="#Clothing" datafld="Price"></span>
</th>
</tr>
<tr>
<th>
<span datasrc="#Clothing" datafld="StockID"></span>
</th>
</tr>
</table>
<div id="buttons">
<button onClick="Clothing.recordset.moveFirst()">|< First</button>
<button onClick="Clothing.recordset.movePrevious(); if (Clothing.recordset.BOF) Clothing.recordset.moveFirst()">< Previous Page </button>
<button onClick="Clothing.recordset.moveNext()">Next Page ></button>
<button onClick="Cothing.recordset.moveLast()">Last >|</button>
</div>


</div>
</div>

<div id="footer">
<div id="footer_inner">
<p>Contact Ollie! 1-800-ODD-ENDS ollie@odds.ends.com</p>
</div>
</div>
</div>
</body>
-------------

Here is the code for the xml doc...
-------------

<?xml version="1.0" encoding="UTF-8"?>

<Products>
<Product type="Clothing">
<Name>Child's Denim Shorts</Name>
<Price>$12.95</Price>
<StockID>jeans008</StockID>
<StockID>jeans010</StockID>
<StockID>jeans012</StockID>
<StockID>jeans014</StockID>
<StockID>jeans016</StockID>
<Photo_S>../images/jeans_sm.jpg
</Photo_S>
<Photo_L>../images/jeans.jpg
</Photo_L>
<Description>Sizes 8-16</Description>

</Product>

<Product type="Clothing">
<Name>Dashing Shirt</Name>
<Price>$9.45</Price>
<StockID>shirtS</StockID>
<Photo_S>../images/shirt_sm.jpg</Photo_S>
<Photo_L>../images/shirt.jpg</Photo_L>
<Description>A dashing shirt for a young child. Order it in exotic colors so
you can easily see them in the playground. Available in S,M,L,XL and Lime
Green, Neon Blue, Hunters Orange, and Rampaging Red. XL costs $1 extra.
Hunters Orange on sale, $3 off</Description>
</Product>
</Products>
 
><a datasrc="#Photo_L"><img datasrc="#Photo_S"></a>
[tt]<a [red]datasrc="#Clothing"[/red] data[red]fld[/red]=[highlight]"P[/highlight]hoto_L"><img [red]datasrc="#Clothing"[/red] data[red]fld[/red]=[highlight]"P[/highlight]hoto_S"></a>[/tt]

><span datasrc="#Clothing" datafld="#Description"></span>
[tt]<span datasrc="#Clothing" datafld=[highlight]"D[/highlight]escription"></span>[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top