Is XPath supported in LrXml?

Maybe it's not cause I cannot find anything about it. Can I use modules written for standard Lua 5.1 like LuaXPath?

Currently there appears to be no XPath support in the SDK.
Also, I don't think you can use LuaXPath with LrXML as LuaXPath relies on the XML DOM structure produced by LuaExpat, which is not comatible with XML DOM of LrXml.

Similar Messages

  • XPath Support in XDK

    Does the new XDK support XPath ?
    Does the API provide classes and methods to query XML documents using XPath ?

    The select methods in the XMLDocument class support XPath.
    http://www.oracle.com/technology/pub/notes/technote_domparser.html

  • XPath support for Date data type.

    Hi,
    I am using XPathAPI class for extracting data from an XML source.I have a column in the data which has date type (any date type supported by MS SQL, Ms Access etc).I want to select only some rows from that column.I'm not aware if XPath provides operations on date types.
    Is there any way I could compare two date values using XPath expressions??
    thanx,
    regards.

    After checking XPath 1.0 recommandation (http://www.w3.org/TR/xpath), I see nothing about date type support.
    You will have to try little tricks, like converting 2002/09/05 into a number 20020905, making it available for < and > comparisons...

  • Feature request: more xpath support in XMLElement

    Hey guys,
    Just wanted to submit a feature request. I'm trying to write code to find the number of Invocation service threads that Coherence uses. It would be very nice if I could use XPath syntax such as the following:
    getSafeElement("cluster-config/services/service[@id='3']/init-params/init-param/param-value")
    Since the API doesn't support that, I have to resort to something like the following:
    XmlElement services = com.tangosol.net.CacheFactory.getClusterConfig().findElement(
            "cluster-config/services");
    List servicesList = services.getElementList();
    for (Iterator i=servicesList.iterator(); i.hasNext(); ) {
        XmlElement element = (XmlElement)i.next();
        if (element.getAttribute("id").getInt() == 3) {
            XmlElement value = element.findElement("init-params/init-param/param-value");
            System.out.println("invocation threads: " + value.getInt());
    }I haven't quite gotten that to work yet, but it's probably close. :)
    Thanks,
    Matt

    Matt,
    There is a helper function in com.tangosol.run.xml.XmlHelper class that makes it almost as easy as using the XPath.
    XmlElement xmlCluster    = CacheFactory.getClusterConfig();
    XmlElement xmlInvocation = XmlHelper.findElement(xmlCluster,
            "cluster-config/services/service/service-type", "Invocation");
    XmlElement xmlThreads    = XmlHelper.findElement(xmlInvocation,
            "../init-params/init-param/param-value");
    System.out.println("invocation threads: " + xmlThreads.getInt());Regards,
    Gene

  • XPath support

    Hi all,
    I want to know if XPath is supported in parserv2 and if it is can any one point me to its documentation or API
    TIA
    Donny

    Hello Ben & Welcome to Apple Discussion,
    Is this what you mean :
    http://www.w3schools.com/xpath/default.asp
    or http://www.stylusstudio.com/xpath.html
    More info please: )
    Yes, this is what I mean. I am a web developer, and would like to use Xpath to query an XML object in Javascript. In IE, I can do that with the "selectNodes" and "selectSingleNode" functions, like this:
    var xpathresults = myXmlDoc.selectNodes(myXpath);
    var xpathresult = myXmlDoc.selectSingleNode(myXpath);
    In Mozilla, I can do that with the "evalute" function, like this:
    var xpathresult = myXmlDoc.evaluate(myXpath, myXmlDoc, myNamespaceResolver, XPathResult.ORDEREDNODE_SNAPSHOTTYPE, null);
    I am trying to determine if there's any way I can do that in Safari.
    Thanks,
    Ben

  • XPath and DOM

    Hi,
    I am wondering how to incorporate support for XPath into my XML DOM app. Do I need to add another library or is support provided in any of the std Java API classes?
    Thanks for help in advance,
    Claire

    Hello
    Xalan, part of the XML apache project (xml.apache.org), offers a module with XPath support (org.apache.xpath). I'm not sure, if Xalan made it into the standard version of the JDK 1.4.
    If you use a XML database, the XML:DB (www.xmldb.org) api also included XPath support as an optional module.
    Mathias

  • Create xml document by xpath in java

    as i know, i can navigate existing xml document by xpath in java, i wonder if i can create a xml document framework by xpath in java?
    something like:
    Document doc = someobject.create(xpath expression);
    then i can use DOM to fill the framework?
    Thanks

    Please refer
    http://www.packtpub.com/article/xpath-support-in-oracle-jdeveloper-xdk-11g

  • Parse xml document with xpath

    I would like to parse an xml document using xpath, see:
    http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html
    however, in the documentation (in the link above), it states that I need J2SE 5.0.
    Currently, I have:
    $ java -version
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    Does that mean that I really have to install J2SE 5.0 in order to use J2SE 5.0's XPath support? Does anybody know anything about getting started with XPath, and whether I can just use my existing version of Java? I've never used XPath.
    For more documentation, one can view:
    http://www.w3.org/TR/xpath20/
    Thank you.

    I have copied the code for the xpath tutorial on
    http://www.onjava.com/pub/a/onjava/2005/01/12/xpath.html
    exactly as it is on the tutorial, and imported the correct jars (I think).
    But still my code is giving lots of errors!
    Granted its my first shot but anyway here's the code and the errors...
    package test;
    import org.jdom.xpath.*;
    import java.io.*;
    import javax.xml.xpath.*;
    public class XPath {
         public static void main (String [] args){
              XPathFactory factory = XPathFactory.newInstance();
              XPath xPath=factory.newXPath();
              XPathExpression  xPathExpression=xPath.compile("/catalog/journal/article[@date='January-2004']/title");
              File xmlDocument = new File("/home/myrmen/workspace/Testing/test/catalog.xml");     
              //FileInputStream fis = new FileInputStream(xmldocument); 
              InputSource inputSource = new InputSource(new FileInputStream(xmlDocument));
              String title = xPathExpression.evaluate(inputSource);
              String publisher = xPath.evaluate("/catalog/journal/@publisher", inputSource);
              String expression="/catalog/journal/article";
              NodeSet nodes = (NodeSet) xPath.evaluate(expression, inputSource, XPathConstants.NODESET);
              NodeList nodeList=(NodeList)nodes;
              SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
              org.jdom.Document jdomDocument = saxBuilder.build(xmlDocument);
              org.jdom.Attribute levelNode = (org.jdom.Attribute)(XPath.selectSingleNode(jdomDocument,"/catalog//journal[@title='JavaTechnology']" + "//article[@date='January-2004']/@level"));
              levelNode.setValue("Intermediate");
              org.jdom.Element titleNode = (org.jdom.Element) XPath.selectSingleNode( jdomDocument,"/catalog//journal//article[@date='January-2004']/title");
              titleNode.setText("Service Oriented Architecture Frameworks");
              java.util.List nodeList = XPath.selectNodes(jdomDocument,"/catalog//journal[@title='Java Technology']//article");
              Iterator iter=nodeList.iterator();
              while(iter.hasNext()) {
                   org.jdom.Element element = (org.jdom.Element) iter.next();
                   element.setAttribute("section", "Java Technology");
              XPath xpath = XPath.newInstance("/catalog//journal:journal//article/@journal:level");
              xpath.addNamespace("journal", "http://www.w3.org/2001/XMLSchema-Instance");
              levelNode = (org.jdom.Attribute) xpath.selectSingleNode(jdomDocument);
              levelNode.setValue("Advanced");
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         Type mismatch: cannot convert from XPath to XPath
         The method compile(String) is undefined for the type XPath
         InputSource cannot be resolved to a type
         InputSource cannot be resolved to a type
         NodeSet cannot be resolved to a type
         NodeSet cannot be resolved to a type
         NodeList cannot be resolved to a type
         NodeList cannot be resolved to a type
         SAXBuilder cannot be resolved to a type
         SAXBuilder cannot be resolved to a type
         The method selectSingleNode(Document, String) is undefined for the type XPath
         The method selectSingleNode(Document, String) is undefined for the type XPath
         Duplicate local variable nodeList
         The method selectNodes(Document, String) is undefined for the type XPath
         Iterator cannot be resolved to a type
         The method newInstance(String) is undefined for the type XPath
         The method addNamespace(String, String) is undefined for the type XPath
         The method selectSingleNode(Document) is undefined for the type XPath
         at test.XPath.main(XPath.java:12)

  • Xpath and oracle business rules

    Hi; are there any examples that demonstrate using XPath in a rule?
    Any comments on whether oracle business rules might be a valid choice for an application that needs to enforce a set of, and varying, constraints on an incoming XML document.
    Thanks for the info.
    -Tim Watson

    The XPath support in the current version of Rules is for asserting portions (or all) of an XML document as facts. The Rules are then written against the elements in the XML that you are interested in.
    I can't say for sure without more details, but Rules would work for enforcing constraints on XML documents.

  • XPath and oracle parser

    Hi,
    I am using Oracle parser to parse my XML file, as i found that it is faster then IBM and sun parser, But i think it does not support XPath, so how can i use XPath and oracle parser, I can also use Sun parser , but dont know if it has XPath support,
    So please help me out

    I suppose it supports DOM or a saxHandler that can provides you a DOM
    tree. For Xpath, may I suggest you my solution : http://www.japisoft.com/jxpath
    Regards,
    A.brillant

  • How to use XPath with XMLBean?

    Hi all,
    I'm using xmlbean for a new project now, and everything was great until I tried
    to use a XPath selection.
    I got a "java.lang.UnsupportedOperationException: This operation requires xqrl.jar"
    exception, but I could not find this jar anywhere.
    I'm using the stand alone version of XMLBena. This is a small project and there
    is no need for an App Server, therefore no full WebLogic 8.1
    Any ideas?
    Thanks,
    Silvio

    Hello Silvio -- Are you working with XMLBeans as downloaded from Apache?
    XPath support in the standalone implementation of XMLBeans is limited to
    simple expressions. The more sophisticated support available via xqrl.jar is
    included with XMLBeans as it ships with WebLogic Platform 8.1.
    Steve
    "Silvio deMorais" <[email protected]> wrote in message
    news:3ff9b696$[email protected]..
    >
    Hi all,
    I'm using xmlbean for a new project now, and everything was great until Itried
    to use a XPath selection.
    I got a "java.lang.UnsupportedOperationException: This operation requiresxqrl.jar"
    exception, but I could not find this jar anywhere.
    I'm using the stand alone version of XMLBena. This is a small project andthere
    is no need for an App Server, therefore no full WebLogic 8.1
    Any ideas?
    Thanks,
    Silvio

  • XPATH on  JSE 1.4.1 ???

    hi
    i would like to know is that possible to use XPATH on JSE 1.4.1 ???
    thanks you
    hanimichi

    There is no standard API in the version of JAXP that is part of J2SE 1.4.1. XPath support was introduced in JDK 5. You may be able to find implementations from Xalan or Saxon that support XPath 1.0 and that run on J2SE 1.4.1.

  • OpenScript & XPath

    Hi,
    Long time reader, first time poster. I've scoured the forums here and can't find any topics on this issue so I thought I'd create one. My question involves the XPath support in OpenScript. I see a lot of talk on this board and in the documentation provided with OpenScript about XPath, yet I can't seem to get standard XPath Axes to work in OpenScript. I'm referring to Axes like ancestor, ancestor-or-self, descendant, preceding-sibling, etc.
    Are we limited to the elements outlined in View > OpenScript Preferences > Record > Web Functional > Object Identification tab for our XPath statements, or can we use any standard XPath language? I've tried the settings in View > OpenScript Preferences > Playback > Functional Test > Object Enumeration to no avail.
    The application I'm testing has dynamically generated menus in a table that is seperated several columns out from the id's used to determine which menu should be selected - it is nice to have axes like preceding-sibling in XPath to get at previous table elements to avoid using id's, which differ with almost every run.
    Any help or insight would be appreciated.
    Thanks!
    -Joel

    Thanks a lot for the replies...I agree that a poorly written XPath for object identification can return multiple results - in that case I wouldn't mind an error or first result only being used by OpenScript - perhaps it could even be an option down the road?
    I also agree that FireBug is an amazing tool for DOM heirarchy and I definintely use it for OpenScript development.
    Unfortunately my question still stands - are XPath axes not supported by OpenScript? - as they are standard components of the XPath language.

  • Xml parsing innovation

    [ANN] VTD-XML Version 1.5 Released
    Eight years after the invention of XML, DOM and SAX,
    despite their respective issues, are still the mainstays
    of application developers.
    So is it the end of road for XML parsing innovation?
    The VTD-XML project team think not. We are proud to
    announce the availability of both C and Java version
    1.5 of VTD-XML, the next generation open-source XML
    parser that goes beyond DOM and SAX in terms of
    performance, memory usage and ease of use.
    The technical highlights of VTD-XML are:
    * Performance: the world's fastest XML parser,
    between 5x~10x faster than DOM
    * Memory Usage: 3x to 5x less than DOM, 1.3x~1.5x
    XML document size
    * Random access with built-in XPath support
    * A simple and intuitive API
    Other advanced features include:
    * Buffer reuse
    * Large document support (2GByte)
    * Incremental update
    * Hardware acceleration
    * Native XML indexing.
    For demos, latest benchmarks, related articles and software
    downloads, please visit http://vtd-xml.sf.net. Also let us
    know your thoughts and suggestions and help us improve
    VTD-XML.

    Don't crosspost.
    http://forum.java.sun.com/thread.jspa?threadID=707987&tstart=20
    It should be noted that this parser is not a full implementation, and ignores some xml constructs, which perhaps helps it's performance numbers in comparison to compliant parsers.

  • Data storage in Swing application

    I'm currently developing a book collection application, which allows a user to search/add/delete entries. I thought about data storage and figured that perhaps just using XML files would be best, since there would only be a few hundred records involved. Would it be easiest to use JAXB for this type of thing? Or perhaps an XML database instead of a few XML files? I'd really appreciate any hints or comments.

    My personal opinion: no, keep it simple.
    A simple XML handling is done by both:
    dom4j www.dom4j.org (better documentation), and
    jdom[7b] www.jdom.org (better performance the last time).
    Use for instance dom4j-full.jar with XPath support for element selection.

Maybe you are looking for