• 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: XML question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML question


  • Subject: Re: XML question
  • From: Emmanuel <email@hidden>
  • Date: Tue, 5 Dec 2006 14:15:47 +0100

At 12:33 PM +0000 12/5/06, Ruth Bygrave wrote:
Trying to get the 'book name' attribute from the book element (the only thing in the XML file), I have tried:
XMLGetText ((XMLXPath with "book name@book"))
XMLGetText ((XMLXPath with "book@book name"))
and various other perms & combs of the above, and the syntax seems to be choking the parser however I try.

Christian said it all: an attribute is like an element except that you prepend "@" to its name.


That said:

1/ I'm not sure if a space in an attribute name is legal,
2/ to get the value of an attribute, it's simpler to use XMLGetAttribute.

Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >XML question (From: Ruth Bygrave <email@hidden>)

  • Prev by Date: Re: XML question
  • Next by Date: Re: acgi dispatcher problems...
  • Previous by thread: Re: XML question
  • Next by thread: Mac or UNIX file
  • Index(es):
    • Date
    • Thread