Setting the environment
Create an application (called XPath
, for example) and a project (called XPath
) in JDeveloper as explained in the earlier chapters. The XPath API will be demonstrated in a Java application. Therefore, create a Java class in the XPath
project with File|New. In the New Gallery window select Categories|General and Items|Java Class. In the Create Java Class window, specify the class name (XPathParser, for example), the package name (xpath in the example application), and click on the OK button.
To develop an application with XPath, add the required libraries to the project classpath. Select the project node in Application Navigator and select Tools|Project Properties. In the Project Properties window, select the Libraries and Classpath node. To add a library, select the Add Library button. Select the Oracle XML Parser v2 library. Click on the OK button in the Project Properties window. We also need to add an XML document that is to be parsed and navigated with XPath. To...