Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 545131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:43:44+00:00 2026-05-13T10:43:44+00:00

I’ve learned that iTunes XML file is actually a plist, and instead of trying

  • 0

I’ve learned that iTunes XML file is actually a plist, and instead of trying to parse the raw XML, I could use property lists.

I’m able to access the “Tracks” section, but I’m able to unable to do anything simple like extracting a track name. Admittedly, I’m stumbling around a bit, but this is the code I’ve gotten to so far:

tell application "System Events"
    tell property list file property_file
        tell contents
            set my_tracks to value of property list item "Tracks"
            repeat with t in my_tracks
                set theName to value of property list item "Name" of t
                display dialog theName
            end repeat
        end tell
    end tell
end tell

Any pointers as to what I’m doing wrong?

If it helps, sample XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.
com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Major Version</key><integer>1</integer>
        <key>Minor Version</key><integer>1</integer>
        <key>Application Version</key><string>9.0.2</string>
        ...
        <dict>
                <key>2471</key>
                <dict>
                        <key>Name</key><string>Check The Rhime</string>
                        <key>Artist</key><string>A Tribe Called Quest</string>
                        ...
                </dict>
                <key>2473</key>
                <dict>
                        <key>Name</key><string>A Short History of Nearly Everyth
ing (Unabridged), Part 1</string>
                        <key>Artist</key><string>Bill Bryson</string>
                        ...
                </dict>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:43:44+00:00Added an answer on May 13, 2026 at 10:43 am

    When you do the value of property list item, AppleScript converts the whole thing into a native AppleScript value; in this case, the value is a record. Thus, you simply need to tweak the inside a little bit:

    property property_file : ¬
        (POSIX path of (path to home folder) & ¬
            "Music/iTunes/iTunes Music Library.xml")
    
    tell application "System Events"
        tell property list file property_file
            tell contents
                set my_tracks to value of property list item "Tracks"
                repeat with t in items of my_tracks
                    display dialog (|Name| of t)
                end repeat
            end tell
        end tell
    end tell
    

    Doing items of my_tracks produces a list of the values of the record; |Name| of t is just record access. Unfortunately, doing this plist processing seems to be very slow, since the XML file is so massive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.