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

XML question


  • Subject: XML question
  • From: Ruth Bygrave <email@hidden>
  • Date: Tue, 5 Dec 2006 12:33:01 +0000

(idiot level, please)

Why is this so *bloody difficult*?

Am using the Satimage XML suite and trying to learn about it by listing books. Perfectly reasonably (unless I'm being stupid), I put the book title in as an attribute to the book root element (because the name of a book is the name of the whole item, which appears to me to be distinct from format or author because it's the main identifier of the item itself). So I can get to the "book/author" with XMLXPath but not the name, and the example XML they offer only gives elements and not attributes (they point out that a name could also be implemented as an attribute, and then don't say how).

AFAIK the syntax I need to get right is part of the DOM and not a peculiarity of the Satimage suite itself, so you'd think it would turn up on Google. but apart from some fairly confusing things saying I need to use an @ sign, can't find any examples.

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.


Regards, Ruth
_______________________________________________
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
  • Follow-Ups:
    • Re: XML question
      • From: Emmanuel <email@hidden>
    • Re: XML question
      • From: "Christian Roth" <email@hidden>
  • Prev by Date: Text Box Within Text Box
  • Next by Date: Re: XML question
  • Previous by thread: Re: Text Box Within Text Box
  • Next by thread: Re: XML question
  • Index(es):
    • Date
    • Thread