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

xml parsing error

Status
Not open for further replies.

mcb999

Programmer
Jan 30, 2007
12
US
Im trying to use an ID I get in my xml to add it to an <a href="">
link but am having some problems displaying this correctly. If I
display the xml element outside of the link it displays properly.

<a href="/Category.cfm?
categoryID=">#xRows.xmlChildren[name].productID#</a>

But when I add it into the href element like this:
<a href="/Category.cfm?categoryID=#xRows.xmlChildren[name
].productID#">#xRows.xmlChildren[name].description#</a>
#xRows.xmlChildren[name].productID#

it falls apart and displays it like this:

1234">

and the link is:

CategoryID=<?xml version...

How do I get it to display the [productID] only and not include all the xml header elements?

Im kind of new to working with xml so im sure its something obvious im
overlooking.

Thanks
 
When I look at the source for this this is what im getting:

<li><a href='/Category.cfm?categoryID=<?xml version="1.0" encoding="UTF-8"?>
<ProductID xmlns=" version="1.0" encoding="UTF-8"?>
<Description xmlns=" &amp; Video Production Companies</Description></a> <?xml version="1.0" encoding="UTF-8"?>


So im not getting the data itself, im getting the xml wrapper for each element. How do I strip or convert this?
Thanks
 
I finally figured this out. Adding .xmlText to the end seemed to fix this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top