This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes NewB to xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "NewB to xml" Watch "NewB to xml" New topic
Author

NewB to xml

A. Wolf
Ranch Hand

Joined: Sep 28, 2003
Posts: 57
I'd really like to go through my iTunes music library.xml file and find all the occurences of
<key>Name</key><string>My music song</string>
<key>Location</key><string>file://localhost/Users...</string>
so i can add it to a list in my java application.
Could someone give me a simple solution? or something to get started?
thanks
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
You might want to start by reading Understanding SAX and Understanding DOM from IBM developerWorks. That should help you decide which one of the approaches you should use for parsing your XML. When you get to actually writing code, the code snippets in the Java Developer's Almanac are very helpful.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
A. Wolf
Ranch Hand

Joined: Sep 28, 2003
Posts: 57
Digedy! I never thought a tutorial could teach me something without losing my nerves!
Thanks.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The dW tutorials are generally pretty good.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NewB to xml