• 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
Re: way to get XML attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: way to get XML attributes


  • Subject: Re: way to get XML attributes
  • From: has <email@hidden>
  • Date: Tue, 11 Mar 2003 13:06:37 +0000

Darwin Zins wrote:

I am using the XML tools from Late Night Software to parse an xml file.
The problem I am having is that the data in the xml file is all stored
as attributes and each element may have a different number of
attributes.

Your attribute names are known, so concatenate the attribute record like so:

set attribRec to attribRec & {|LastName|:missing value,
[NO-BREAK]|FirstName|:missing value, |BusinessPhone|:missing value,
[NO-BREAK]|BusinessFax|:missing value, [your other properties here]}

That'll give you a record containing all possible properties, and you can test each by name to see if its value is a string (XML attribute exists) or 'missing value' (no XML attribute).

has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: way to get XML attributes
      • From: LE STANG Jean-Baptiste <email@hidden>
    • Procedure Problem
      • From: Darwin Zins <email@hidden>
  • Prev by Date: Illustrator Newbie Colours question
  • Next by Date: Procedure Problem
  • Previous by thread: Re: Illustrator Newbie Colours question
  • Next by thread: Procedure Problem
  • Index(es):
    • Date
    • Thread