Damein

Another XML Failure

2 posts in this topic

#1 ·  Posted

So I've got this XML file I'm writing up and I have it designed like this:

 

?<?xml version="1.0" encoding="iso-8859-1"?>
<movies>
  <item id="001" name="I Know What You Did Last Summer" quality="4" genre="Horror"</item>
</movies>

 

So I want to be able to pull the ID, quality and genre of each item listed in the XML... but I can't seem to get it to work. All the examples I've looked at find the node because the item is listed like: "<id>001</id>" but nothing I found could read an XML like this, where each entry has multiple items in it...

 

Thanks for the help if you can!


MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You missed this:

 

 <item id="001" name="I Know What You Did Last Summer" quality="4" genre="Horror"></item>

 

Or:

 <item id="001" name="I Know What You Did Last Summer" quality="4" genre="Horror"/>

Another easy way to see if it's valid, is to open the '.xml' file in IE...if it's well formed, it will display the structure, if not, it's only text/empty.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now