[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Absolute path of a selected xml snippet

David Lee dlee at calldei.com
Thu Feb 4 09:36:27 PST 2010


  Absolute path of a selected xml snippet
Since you posted to xquery-talk I think we all assumed you were using XQuery not native java.

If your not already using XQuery in your app, I might suggest you implement this in pure java, its not that difficult.
But how to do it will depend on what XML API your currently using.

But if you plan on using XQuery, the first choice is to pick a Java XQuery implementation (before picking the API).
The API interface (XQJ) doesn't actually provide an implementation.

My personal favorite for embedded xquery in java is Saxon,  www.saxonica.com
And if your using Saxon I'd suggest its S9API over XQJ



----------------------------------------------------
David A. Lee
http://x-query.com/mailman/listinfo/talk
http://www.calldei.com
http://www.xmlsh.org



From: Ricardo Queirós 
Sent: Thursday, February 04, 2010 9:16 AM
To: David Lee 
Cc: http://x-query.com/mailman/listinfo/talk ; William Candillon 
Subject: Re:  Absolute path of a selected xml snippet


Thanks to all! 
I'm using JAVA.
The best approach is use XQuery API for Java (XQJ)?


Thanks!


On 4 February 2010 14:05, David Lee <http://x-query.com/mailman/listinfo/talk> wrote:

  In your case you might want instead

  http://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.html



  ----------------------------------------------------
  David A. Lee
  http://x-query.com/mailman/listinfo/talk
  http://www.calldei.com
  http://www.xmlsh.org


  --------------------------------------------------
  From: "William Candillon" <http://x-query.com/mailman/listinfo/talk>
  Sent: Thursday, February 04, 2010 8:42 AM
  To: "Ricardo Queirós" <http://x-query.com/mailman/listinfo/talk>
  Cc: <http://x-query.com/mailman/listinfo/talk>
  Subject: Re:  Absolute path of a selected xml snippet 



    Hi Ricardo,

    You can use the functx library that contains such functions:
    http://www.xqueryfunctions.com/xq/functx_path-to-node.html.
    Functx is very easy to deploy in your XQuery app since it is not bound
    to a specific XQuery engine or library.

    Best regards,

    William

    2010/2/4 Ricardo Queirós <http://x-query.com/mailman/listinfo/talk>:

      Hi to all,
      I have the following XML document in a text box:

      <A>
      <B> 1 </ B>
      <B> 2 </ B>
      </ A>

      By selecting "<B> 1 </ B>"

      I want to get your absolute path XPath, ie, "/A/B [1]"
      You can do this using XQuery?
      What do you advise?
      Best regards!

      --
      Ricardo Queirós

      _______________________________________________
      http://x-query.com/mailman/listinfo/talk
      http://x-query.com/mailman/listinfo/talk



    _______________________________________________
    http://x-query.com/mailman/listinfo/talk
    http://x-query.com/mailman/listinfo/talk





-- 
Ricardo Queirós



--------------------------------------------------------------------------------


_______________________________________________
http://x-query.com/mailman/listinfo/talk
http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100204/2a558a55/attachment-0001.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.