Page 1 of 1

[solved] parsing xml

Posted: Mon Apr 03, 2006 4:09 am
by Nunners
I have to output the Title of an album, which can be obtained form an xml file. The contents of the file are as follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
  <dict>
    <key>Head</key>
    <dict>
      <key>Format</key>
      <string>com.atomixtech.jetphoto.album.datalist</string>
      <key>Version</key>
      <string>1.1</string>
      <key>CanvasWidth0</key>
      <string>128</string>
      <key>CanvasHeight0</key>
      <string>128</string>
      <key>CanvasWidth1</key>
      <string>256</string>
      <key>CanvasHeight1</key>
      <string>256</string>
      <key>CanvasWidth2</key>
      <string>640</string>
      <key>CanvasHeight2</key>
      <string>640</string>
      <key>Language</key>
      <string>English</string>
      <key>Title</key>
      <string>WildlifePark</string>
      <key>Identification</key>
      <string>WildlifePark_060204135618</string>
      <key>Description</key>
      <string>Cotswold Wildlife Park, 2nd April 2005</string>
      <key>Keywords</key>
      <string></string>
      <key>ItemCount</key>
      <string>28</string>
    </dict>
    <key>Items</key>
    <array>
      <dict>
        <key>ID</key>
        <string>1</string>
        <key>File</key>
I'm struggling to see how best to extract the Title "WildlifePark" from the file - any suggestions?

[Solved]parsing xml

Posted: Mon Apr 03, 2006 5:32 am
by Nunners
I've now worked this out - it is a MAC xml file, and similar to the iTunes XML structure.... thanks for looking!