Goose Posted April 13, 2007 Share Posted April 13, 2007 I am going to be parsing an XML file that looks like the following. Basically I want to know what functions I need to call in order to get the XML parsed. I have been to the w3schools website and understand how to initiate the parser object I just don't know what to do after that. In my example there can be many <room> elements, many <message> elements and <user> elements. Thanks in advance! Note: I can handle looping and all that jazz, I just want to know how to get the count of certain elements and how to get the values of certain elements. Examples would be awesome! <room> <name>Default</name> <id>1</id> <messages> <message> <usr>goose</usr> <msg>Hello everyone!</msg> </message> <message> <usr>goose</usr> <msg>This is an XML example.</msg> </message> </messages> <users> <user> <uid>1</uid> <usr>goose</usr> </user> </users> </room> Quote Link to comment Share on other sites More sharing options...
fenway Posted April 13, 2007 Share Posted April 13, 2007 I can't imagine that this hasn't been done yet. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.