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

Re: XMLlib library


  • Subject: Re: XMLlib library
  • From: Simon Forster <email@hidden>
  • Date: Sun, 27 Apr 2014 20:36:43 +0100

On 24 Apr 2014, at 23:47, waynemelrose <email@hidden> wrote:

> OK by request, here’s this question in a new thread .
>
> I have a need to parse XML. I’d like to be using Satimage’s scripting addition XMLlib. However, the parsing is to be done from a FileMaker button.

Not really been following this thread. However, you can use Safari to parse XML and call that from an AppleScript:

tell application "Safari"
	set theResult to do JavaScript "
parseXml = function(xmlStr) {
	return ( new window.DOMParser() ).parseFromString(xmlStr, 'text/xml');
};
var xml = parseXml('<foo>Stuff</foo>');
toReturn = (xml.documentElement.nodeName);
" in document 1
	display dialog theResult
end tell

And I imagine[1] you can do this within FileMaker using a web viewer object to do the parsing and then copy the text from the web viewer.

Hope this fires a neurone in the right direction.

ATB

Simon


[1] I've got a trivial FileMaker solution parsing out text using grep in JavaScript. This is then used to create new records within FileMaker. I see no good reason that similar techniques can't be used to parse XML using JavaScript from within FileMaker.

> So the code and scripting addition needs to be contained within the script. This means that storing it inside my own script bundle is not going to suffice. It needs to be contained within the FileMaker document. As I have mentioned, this is more about policy of not needing to install components on users machines.
>
> At this point, I think the answer is that it’s not possible. The only solution would be to store the XMLlib inside another bundle.
>
> At this point, I’m guessing it’s not going to happen. So at this point I guess I’m back to using System events XML parsing which, from memory doesn’t have xpath support?
>
> Thanks for all the replies!
>
> Wayne Melrose
> _______________________________________________
> 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/archives/applescript-users
>
> This email sent to email@hidden


 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: XMLlib library
      • From: Wayne Melrose <email@hidden>
References: 
 >XMLlib library (From: waynemelrose <email@hidden>)

  • Prev by Date: Re: XMLlib library
  • Next by Date: Re: XMLlib library
  • Previous by thread: Re: XMLlib library
  • Next by thread: Re: XMLlib library
  • Index(es):
    • Date
    • Thread