• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Aaaarrrggghhh XML!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aaaarrrggghhh XML!


  • Subject: Aaaarrrggghhh XML!
  • From: Martin Orpen <email@hidden>
  • Date: Wed, 23 Feb 2005 13:46:03 +0000

Is there an easy method to drill down through XML data and present the tags
and contents in a readable form such as "tag name: value"?

I'm doing this with Photoshop's metadata at the moment. Looping through a
list of tags and contents is easy enough:

    set myList to {}
    set end of myList to XML namespace uri of item 1 of c & return
    repeat with n from 1 to count of items in c
        set t to XML tag of item n of c
        set d to XML contents of item n of c
        set end of myList to t & ": " & d & return
    end repeat

(Using LateNite's XML Tools osax)

Which is OK for simple stuff, but as soon as you hit XML contents with
nested XML data you get errors :-(

Unfortunately, I can't guarantee the XML content so will need to have a
solution that can work with some deeply nested data.

Before I start writing handlers for this I thought I'd ask if anybody has
already got this sorted?

--
Martin Orpen


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Aaaarrrggghhh XML!
      • From: Roger Howard <email@hidden>
  • Prev by Date: Re: Creating a folder in user preferences
  • Next by Date: Dock Q...
  • Previous by thread: Re: Creating a folder in user preferences
  • Next by thread: Re: Aaaarrrggghhh XML!
  • Index(es):
    • Date
    • Thread