| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Commons JXPath example source code file (index.xml)

This example Commons JXPath source code file (index.xml) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Commons JXPath tags/keywords

address, java, jxpath, jxpath, license, license, see, the, the, version, w3c, xpath, xpath, you

The Commons JXPath index.xml source code

<?xml version="1.0"?>
   Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   See the License for the specific language governing permissions and
   limitations under the License.
      <title>JXPath Home
      <author email="">Commons Documentation Team
      <author email="">Dmitri Plotnikov
      <revision>$Id: index.xml 561417 2007-07-31 18:13:25Z niallp $

      <section name="The JXPath Component">
             The <code>org.apache.commons.jxpath package defines a simple
             interpreter of an expression language called XPath. JXPath applies <em>XPath
             expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet contexts, DOM etc,
             including mixtures thereof.
             Consider this example:
Address address = (Address)JXPathContext.newContext(vendor).
            This XPath expression is equivalent to the following Java code:
Address address = null;
Collection locations = vendor.getLocations();
Iterator it = locations.iterator();
while (it.hasNext()){
    Location location = (Location);
    String zipCode = location.getAddress().getZipCode();
    if (zipCode.equals("90210")){
      address = location.getAddress();
            XPath was standardized by W3C and is used in both XSLT and XPointer.
            If you want to find out more about XPath, a good place to start
            is an excellent XPath Tutorial by <a href="">W3Schools
            The official definition of XPath by W3C can be found at
            <a href="">XML Path Language (XPath) Version 1.0
            Primary applications of JXPath are in scripting: JSP and similar template/script based technologies.
            However, programmers who prefer XML-flavored APIs, should consider JXPath as
            an alternative to other expression languages as well. JXPath is a must-have tool
            for those who work with mixtures of Java objects and XML and need to frequently
            traverse through graphs of those.
            JXPath documentation currently contains:
              <li>User's Guide
              <li>JavaDoc API Documentation
<!--              JXPath Design, which is a document
                primarily intended for those who are interested in extending JXPath.
                It could also be quite useful if you are debugging a tough problem.

      <section name="Releases">
        <p>See the JXPath Downloads
           page for current/previous releases.


Other Commons JXPath examples (source code examples)

Here is a short list of links related to this Commons JXPath index.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.