This frequently asked questions section aims to introduce you to the basic questions that may occur when using the XML Toolkit for Java.
Questions
- Where can I find the JavaDoc of the XML Toolkit?
- How can I build a DOM tree from an XML document?
- How can I use the XML Toolkit in a standalone program?
- How can I use the XML Toolkit in a deployed application?
- How can I use Xerces parser in my application?
- How can I use an HTTP proxy while parsing an XML?
Answers
- You can find the JavaDoc of the XML Toolkit for Java in the SAP NetWeaver Developer Studio Help section under SAP Web AS Documentation → SAP Web AS Technologies → Java 2 Platform, EE v1.3 API Specification.
- See the javax.xml.parsers.* package documentation.
- To use the XML Toolkit, you must register a reference to it from your application. This can be done at deployment time using either the Deploy tool or the Deploy Service CHANGEREF command. To register a reference from the deployed application to the SAP XML Toolkit library, refer to Application Deployment Properties Management .
In addition, you can use the SAP NetWeaver Developer Studio to add a reference from your application to the SAP XML Toolkit library. For the selected application choose Project → Properties → Java Build Path → Libraries → Add Variable. Select SAP_XML_TOOLKIT_LIBS_HOME and choose Extend. In lib folder, select sapxmltoolkit.jar and choose OK.
- There are three possible ways to use Xerces parser in your application:
- Register Xerces as an additional library on the SAP J2EE Engine
You can do this using the Deploy Service CHANGE_LIB command, or manually copy the archive file in <SAP_J2EE_Engine_install_dir>/cluster/server/bin/ext / directory and you can write your own provider.xml file in which you can specify the reference to the Xerces library. For more information, see library.provider.dtd . To register a reference from your deployed application to the Xerces library, refer to Application Deployment Properties Management .
- If you are using the Xerces parser in classes that are included in a WAR file, add xerces.jar in the Web-Inf/lib directory in the WAR.
- Add xerces.jar to your applications EAR.
- You must set the http.proxyHost and http.proxyPort system properties.