Re: XML question
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>) |