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

Re: XMLlib XML to List


  • Subject: Re: XMLlib XML to List
  • From: Emmanuel <email@hidden>
  • Date: Mon, 5 Feb 2007 20:05:16 +0100

At 9:33 AM -0800 2/5/07, Bruce Robertson wrote:
set theRoot to "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<person>
    <name>Wayne</name>
    <email>email@hidden</email>
    <address>2 mystreet st</address>
</person>"


XMLGetText (XMLXPath theRoot with "*")

Bruce, is that what the dictionary says? Does it say that XMLXPath's direct parameter is a string?


Here's the working script, if you still don't have time to open the dictionary.

set theroot to XMLRoot (XMLOpen "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<person>
    <name>Wayne</name>
    <email>email@hidden</email>
    <address>2 mystreet st</address>
</person>")

XMLGetText (XMLXPath theroot with "*")
 --> {"Wayne", "email@hidden", "2 mystreet st"}
_______________________________________________
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: 
 >Re: XMLlib XML to List (From: Bruce Robertson <email@hidden>)

  • Prev by Date: RE: Help to fix script..Anyone?
  • Next by Date: RE: Help to fix script..Anyone?
  • Previous by thread: Re: XMLlib XML to List
  • Next by thread: Re: Scripting XCode: determine current source document and text selection
  • Index(es):
    • Date
    • Thread