• 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: XMLNextSibling is there an easier way
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XMLNextSibling is there an easier way


  • Subject: Re: XMLNextSibling is there an easier way
  • From: Jim Skibbie <email@hidden>
  • Date: Wed, 30 Apr 2008 16:02:56 -0500
  • Thread-topic: XMLNextSibling is there an easier way

Title: Re: XMLNextSibling is there an easier way
Yes, that is the element I’m looking to point to, but that XMLXPath command does not return an XMLRef using XMLLib in Applescript when requested like this:

   
set CustomFieldPath to XMLXPath the_root with "ROW/IDNoSetItemParent[. = \"6353368\"]/following-sibling::Value[position()=1]"

I get back an empty list. But, when requested like this:

    set CustomFieldPath to XMLXPath the_root with "ROW/IDNoSetItemParent[.=\”6353368\”]"

I get back a list containing an XMLRef to that path. I then need to use the XMLNextSibling function three times to drop down to the <Value> element.

Either the “following-sibling” function doesn’t work in XMLXPath, or somehow I have the syntax wrong?

Thanks.
Jim

On 4/30/08 3:43 PM, "Philip Aker" <email@hidden> wrote:

I'm guessing what you need is "first Value after matched IDNoSetItemParent":

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="//ROW">
<xsl:value-of select="
IDNoSetItemParent[.='6353368']/following-sibling::Value[position()=1]"/>
</xsl:template>
</xsl:stylesheet>

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Sent from my SE/30
 _______________________________________________
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: XMLNextSibling is there an easier way
      • From: email@hidden
References: 
 >Re: XMLNextSibling is there an easier way (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: View Options
  • Next by Date: Re: Image Meta data Question
  • Previous by thread: Re: XMLNextSibling is there an easier way
  • Next by thread: Re: XMLNextSibling is there an easier way
  • Index(es):
    • Date
    • Thread