XML Diff API

Hi!
I would urgently need an API providing functionality for comparing two xml files and creating a delta (e.g. which elements were deleted in the first file).
I was searching the web for hours and could just find applications, but no apis for java.
Hope that anyone could help me.
Thx, Christian

Where do I get it from? I think it's only included in the commercial license of Oracle 10g.

Similar Messages

  • Schema-aware XML Diff utility

    Is there a XML Diff utility/API that is schema aware? i.e. can determine that <foo bar="true"/> is the same as <foo/> if the schema says that the default value for the optional bar attribute is "true".
    As far as I can see, oracle.xml.XMLDiff has no such feature.
    Vijay

    Most XML diff APIs are not schema aware. XML document differences implies differences in XML elements and attributes, not a validation of the XML documents with a schema.
    http://www.devx.com/Java/Article/30943

  • Nested while defining class: com.sun.xml.ws.api.WSBinding ???

    Why is this happening, I am trying to access servlet, 2.4 on the Webshere 6.1, installation as succesfull and the servlet is running without exceptions.
      nested while defining class: com.sun.xml.ws.api.WSBinding
    This error indicates that the class: javax.xml.ws.Binding
    could not be located while defining the class: com.sun.xml.ws.api.WSBinding
    This is often caused by having the class at a higher point in the classloader hierarchy
    Dumping the current context classloader hierarchy:
        ==> indicates defining classloader
        *** indicates classloader where the missing class could have been found
    ==>[0]
    com.ibm.ws.classloader.CompoundClassLoader@51905190
       Local ClassPath: C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\classes;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\aopalliance-1.0.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\commons-logging-1.1.1.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxb-impl-2.1.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxb-xjc-2.1.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxws-rt-2.1.4.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxws-rt-2.1.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxws-spring-1.8.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jboss-j2ee.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jremote.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\log4j-1.2.9.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.aop-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.asm-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.beans-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.context-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.core-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.expression-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.jms-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.transaction-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.web-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\spring-batch-infrastructure-2.1.0.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\stax-ex-1.2.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\streambuffer-0.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\TWSCore.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\xbean-spring-3.4.3.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war
       Delegation Mode: PARENT_FIRST
       [1] com.ibm.ws.classloader.JarClassLoader@777399894 Local Classpath:  Delegation mode: PARENT_FIRSTEdited by: romanshtekelman on Sep 9, 2010 7:34 AM

    For future reference...
    We followed the following instructions and created a shared lib.
    http://download.oracle.com/docs/cd/E12524_01/web.1013/e12290/opensrc.htm#BABDDAIF
    We resolved most of our class loading issues.
    BR//Bahman

  • How to trigger xml publisher API (ex:Delivering Documents via e-Mail)?

    Dear All:
    How to use xml publisher API ?
    In user's guide always talk API's code.(ex:Delivering Documents via e-Mail
    // create delivery manager instance
    DeliveryManager dm = new DeliveryManager();
    // create a delivery request
    DeliveryRequest req =
    dm.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
    // set email subject
    req.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT, "Invoice");
    // set SMTP server host
    req.addProperty(
    DeliveryPropertyDefinitions.SMTP_HOST, "mysmtphost");
    // set the sender email address
    req.addProperty(DeliveryPropertyDefinitions.SMTP_FROM,
    "[email protected]");
    // set the destination email address
    req.addProperty(
    DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS,
    "[email protected], [email protected]" );
    // set the content type of the email body
    req.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE,
    "text/html");
    // set the document file name appeared in the email
    req.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME,
    "body.html");
    // set the document to deliver
    req.setDocument("/document/invoice.html");
    // submit the request
    req.submit();
    // close the request
    req.close(); )
    Not say how to use this code to account effect !!
    Having anybody to use API before?
    Please tell me how to use that,thanks!!
    BY Emily_ye

    Hi Emily
    I had the same question. After much research and a lot of deduction I produced the following:
    import oracle.apps.fnd.cp.request.*;
    import java.io.*;
    import java.sql.*;
    import java.util.Vector;
    import oracle.apps.fnd.util.*;
    import oracle.apps.xdo.XDOException;
    import oracle.apps.xdo.common.pdf.util.PDFDocMerger;
    import oracle.apps.xdo.delivery.DeliveryException;
    import oracle.apps.xdo.delivery.DeliveryManager;
    import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
    import oracle.apps.xdo.delivery.DeliveryRequest;
    import oracle.jdbc.driver.OracleCallableStatement;
    public class RunTravProgram implements JavaConcurrentProgram {
    CpContext mCtx; // global reference to concurrent program context
    LogFile logFile; // global reference to context logfile
    OutFile outFile; // global reference to context outfile
    Connection mConn = null;
    ReqCompletion lRC;
    //File Separator
    private String mFileSeparator;
    // globals for template
    String XDOAppShortName = "";
    String XDOtemplateCode = "";
    // hard-wired constants for template addition
    final String XDOLanguage = "en";
    final String XDOTerritory = "US";
    final String XDOFinal_format = "PDF";
    final String XDOtemplateType = "TEMPLATE_SOURCE";
    String PDFFile = "";
    String outFilePath = "";
    String progShortName = "";
    String progDesc = "";
    Integer iRequestID = 0;
    String sWatermark = ""; // watermark text
    String emailAddress = ""; // Not Implemented
    String emailServer = "";
    public static final String M_SUCCESS = "SUCCESS";
    public static final String M_ERROR = "ERROR";
    public static final String M_WARNING = "WARNING";
    * Create a Java FND ConcurrentRequest objec to call fnd_request.submit_request
    * The first three parameters are:
    * Application Short Name -- Application Short name (ie. WAHC)
    * Current Program Short Name -- Concurrent Program being called
    * Current Program Description -- description for above
    * These should be the first three parameters passed by the concurrent
    * program in this order. The next two are constants set to null
    * These are followed by the parameters passed by the first concurrent
    * program that are being passed to the next concurrent program.
    * I am limiting the parameter list to ten for now.
    // Dynamic PLSQL statement used to get a concurrent request completion status
    // This is necessary because the java class does not provide this method :-(
    String mGetCompleteStatus =
    "DECLARE R_VAL BOOLEAN; " + "b_phase VARCHAR2 (80) := NULL; " +
    "b_status VARCHAR2 (80) := NULL; " +
    "b_dev_phase VARCHAR2 (80) := NULL; " +
    "b_dev_status VARCHAR2 (80) := NULL; " +
    "b_message VARCHAR2 (240) := NULL; " + "BEGIN " +
    "r_val := fnd_concurrent.wait_for_request (:1,5,1000," +
    "b_phase,b_status,b_dev_phase,b_dev_status,b_message); " +
    ":2 := b_phase; " + ":3 := b_status; " + ":4 := b_message; " + "end;";
    public RunTravProgram() {
    // no constructor necessary for now
    * Concurrent Processing provides an interface 'JavaConcurrentProgram' with abstract method
    * runProgram() which passes the concurrent processing context 'CpContext'. The concurrent
    * program developer will implement all of their business logic for a concurrent program in
    * runProgram(). The main() method, implemented by AOL, will call runProgram() after
    * performing all of the required initialization for the concurrent program, including
    * establishing a database connection, initializing the required contexts, and setting up
    * the log and output files. CpContext will have the request specific log and output
    * file input methods
    public void runProgram(CpContext pCpContext) {
    mCtx = pCpContext;
    OracleCallableStatement lStmt = null;
    boolean bCompletion = true;
    String sPhase = "";
    String sStatus = "";
    String sMessage = "";
    //get handle on request completion object for reporting status
    lRC = pCpContext.getReqCompletion();
    // assign logfile
    logFile = pCpContext.getLogFile();
    // assign outfile
    outFile = pCpContext.getOutFile();
    // assign fileseparator
    mFileSeparator = getFileSeparator();
    // get the JDBC connection object
    mConn = pCpContext.getJDBCConnection();
    outFilePath =
    ((new File(outFile.getFileName())).getParent() == null ? "" :
    (new File(outFile.getFileName())).getParent() +
    mFileSeparator);
    logFile.writeln("OutFile File Path: -> " + outFilePath, 0);
    // get parameter list object from CpContext
    // these come from the concurrent program
    ParameterList lPara = pCpContext.getParameterList();
    // create a temporary array and retrieve the parameters created by
    // the program. Currently limiting the number of parameters to 10 for now
    String pvals[] = new String[10];
    int pcount = 0;
    while (lPara.hasMoreElements()) {
    NameValueType aNVT = lPara.nextParameter();
    pvals[pcount] = aNVT.getValue();
    pcount++;
    if (pcount > 9)
    break;
    // send parameter values to the log file
    logFile.writeln("Arg 1: APPL_SHORT_NAME -> " + pvals[0], 0);
    logFile.writeln("Arg 2: CURR_PROG_SHORT_NAME -> " + pvals[1], 0);
    logFile.writeln("Arg 3: CURR_PROG_DESCRIPTION -> " + pvals[2], 0);
    logFile.writeln("Arg 4: TEMPLATE_CODE -> " + pvals[3], 0);
    logFile.writeln("Arg 5: P_PLANT_CODE -> " + pvals[4], 0);
    logFile.writeln("Arg 6: P_BATCH_NO -> " + pvals[5], 0);
    logFile.writeln("Arg 7: P_SHOW_PROMISE -> " + pvals[6], 0);
    logFile.writeln("Arg 8: P_WATERMARK -> " + pvals[7], 0);
    XDOtemplateCode = pvals[3]; // store the template name globally
    progShortName = pvals[1]; // store the program short name globally
    XDOAppShortName = pvals[0]; // store the application short name
    sWatermark = pvals[7]; // store the watermark globally
    progDesc = pvals[2];
    try {
    // create a concurrent request object
    ConcurrentRequest cr = new ConcurrentRequest(mConn);
    // use the parameters to call fnd_request.submit_request
    cr.addLayout(XDOAppShortName, XDOtemplateCode, XDOLanguage,
    XDOTerritory, XDOFinal_format);
    Vector param = new Vector();
    param.add(pvals[4]); // plant code
    param.add(pvals[5]); // batch ID
    param.add(pvals[6]); // Show SO info flag
    iRequestID =
    cr.submitRequest(XDOAppShortName, progShortName, progDesc,
    null, false, param);
    mConn.commit();
    // send the request ID to the log file
    logFile.writeln("-- Request ID: ->" + Integer.toString(iRequestID),
    0);
    // call fnd_concurrent.wait_for_request to wait until the request
    // has ended - use this to check the request status before proceeding
    lStmt =
    (OracleCallableStatement)mConn.prepareCall(mGetCompleteStatus);
    lStmt.setInt(1, iRequestID);
    lStmt.registerOutParameter(2, java.sql.Types.VARCHAR, 0, 255);
    lStmt.registerOutParameter(3, java.sql.Types.VARCHAR, 0, 255);
    lStmt.registerOutParameter(4, java.sql.Types.VARCHAR, 0, 255);
    lStmt.execute();
    // get the results of the completion
    sPhase = lStmt.getString(2);
    sStatus = lStmt.getString(3);
    sMessage = lStmt.getString(4);
    lStmt.close();
    // send the results of the request processing to the log file
    logFile.writeln("-- Phase: -> " + sPhase, 0);
    logFile.writeln("-- Status: -> " + sStatus, 0);
    logFile.writeln("-- Message: -> " + sMessage, 0);
    // test here to make sure it completed correctly
    if (sPhase.equals("Completed") && sStatus.equals("Normal")) {
    // construct the PDF file name generated by the called request
    PDFFile = progShortName + "_" + iRequestID + "_1.pdf";
    // add a watermark to the generated PDF
    // create an output stream for the existing PDF
    // and set ouput to append
    OutputStream pdfout =
    new FileOutputStream(outFilePath + PDFFile, true);
    // create an inputstream array (required by calling method)
    InputStream pdfin[] = new InputStream[1];
    pdfin[0] = new FileInputStream(outFilePath + PDFFile);
    // add the watermark passed as a parameter
    bCompletion = addWatermark(pdfin, pdfout);
    // assign the modified file to the context out
    // this will print using this request
    if (bCompletion)
    outFile.setOutFile(outFilePath + PDFFile);
    // release the connection object
    // and set the completion status for the request
    if (bCompletion) {
    pCpContext.getReqCompletion().setCompletion(ReqCompletion.NORMAL,
    } else {
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } catch (SQLException s) {
    logFile.writeln("SQL Error: Exception thrown w/ error message: " +
    s.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } catch (IOException ioe) {
    logFile.writeln("IO Error: Exception thrown w/ error message: " +
    ioe.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } catch (Exception e) {
    logFile.writeln("General Exception: " + e.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    pCpContext.releaseJDBCConnection();
    } finally {
    try {
    if (lStmt != null)
    lStmt.close();
    pCpContext.releaseJDBCConnection();
    } catch (SQLException e) {
    logFile.writeln(e.getMessage(), 0);
    lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
    * addWatermark()
    * @param pdfin
    * @param pdfout
    * @return boolean
    * This method will work for an existing document or a newly generated
    * one. Set the outputstream append flag to false for a new document
    * and true for an existing one.
    * NOTE: PDFDocMerger requires an inputstream array even if it only
    * contains one document.
    private boolean addWatermark(InputStream[] pdfin, OutputStream pdfout) {
    if (!sWatermark.equals("")) {
    try {
    PDFDocMerger docMerger = new PDFDocMerger(pdfin, pdfout);
    //docMerger.setTextDefaultWatermark(sWatermark);
    docMerger.setTextWatermark(sWatermark, 80f, 50f);
    docMerger.setTextWatermarkAngle(25);
    docMerger.setTextWatermarkColor(1.0f, .50f, .50f);
    docMerger.setTextWatermarkFont("Garamond", 100);
    docMerger.process();
    docMerger = null;
    return true;
    } catch (XDOException e) {
    logFile.writeln("Watermark process Failed: " + e.getMessage(),
    0);
    return false;
    return true;
    * Returns the file separator
    private String getFileSeparator() {
    return (System.getProperty("file.separator"));
    * EBSEmailDelivery
    * @return
    * Just for testing right now.
    private boolean EBSEmailDelivery() {
    if (!emailAddress.equals("")) {
    try {
    // create delivery manager instance
    DeliveryManager delMgr = new DeliveryManager();
    // create a delivery request
    DeliveryRequest delReq =
    delMgr.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
    // set email subject
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT,
    "EBS Report:" + progDesc +
    " for request: " + iRequestID);
    // set SMTP server host
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_HOST,
    emailServer); // need to supply the email smtp server
    // set the sender email address
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_FROM,
    emailAddress);
    // set the destination email address
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS,
    emailAddress);
    // set the content type of the email body
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE,
    "application/pdf");
    // set the document file name appeared in the email
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME,
    PDFFile);
    // set the document to deliver
    delReq.setDocument(outFilePath + PDFFile);
    // submit the request
    delReq.submit();
    // close the request
    delReq.close();
    return true;
    } catch (DeliveryException de) {
    logFile.writeln("email process Failed: " + de.getMessage(), 0);
    return false;
    return true;
    This is the class for a JCP I created to perform the following:
    1) Launch an existing Concurrent Program that produces PDF output
    2) Grab the PDF and apply a watermark based on user input or conditions
    3) associate the modified PDF to CP output for PASTA printing
    It isn't elegant but it is fairly simple. I added the email capability and tested it but am not implementing it at the present time.
    there is a fair amount of information out there that explains how to create a JCP councurrent program but very little that demonstrates the class needed.
    I hope this helps

  • XML diff and merge - free lib?

    I'm using my own XML communication protocol and got a problem. I transfer a configuration with this protocol, and the config can grow very large. So I want to create a diff of old/new configuration an transfer only this diff. On the receiver side the last received config should be patched with the diff.
    I'm using JDOM.
    Is there a free lib for XML diff and merge/patch available? I already googled for it but found only a commercial lib.
    Thanks in advance

    I like ExamDiff for Windows. It was free last time I downloaded it, but I haven't looked in a while.
    I don't know of any good merge tools, streamy. I'll have to crib what comes back from others.
    %

  • Use XML-Diff Elsewhere

    I have been looking for XML Diff for quite some time.
    I was pleased to see the feature in a free application and it encouraged me to use JDeveloper
    http://geoffadf.blogspot.com/2010/02/xml-merge-showing-automatically.html
    What are the licence considerations for using this code (xml-compare.jar) elsewhere?
    E.g. if I wanted to create a Swing Application to just do XML Diff or create a plugin for other IDEs?

    You can't pick up code libraries from the core of JDeveloper and use it in your own application. The code belongs to Oracle.

  • XML publisher API registration

    Hai,
    Can anyone tell me the procedures to be followed for calling a XML publisher APIs in EBS to get certain output format?
    Thanks in Advance.

    The document
    XML Publisher 5.6.2 Core Components APIs
    can be found here:
    http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html

  • Can we use javax.xml.parser API's from j2sdk kit?

    Hi All,
    I am new to this jaxp API's and my first doubt is Can I use the javax.xml.parser API which come bundled with j2sdk-1.4.1 or Should I install JWSDP-1.3 to get to javax.xml.parsers API?
    Thanks

    Hi,
    I am trying to read an xml file on Solaris.
    Can we not use doc.getElementById(String elementID) after deriving doc obejct ?
    Here is the code I am trying to use:
    try
    factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(false);
    File file = new File("/command/parse_doc.xml");
    doc = factory.newDocumentBuilder().parse(file); //upto here it works
    Element element = doc.getElementById("Topics");
    String name = element.getTagName(); //returns nothing but throws exception "null"
    }catch(Exception exe){
    out.println("Exception:" + exe.getMessage());}
    here I get no such element, and the try catch block exception also null.
    Is there something I am missing?
    DO I have to call doc.getDocumentElement() before I call get ElementBy ID() and if so why?
    Thanks.

  • XML DOM API vs. XPATH

    Hi,
    We are using Oracle v9.2.0.4. Can any one share there knowledge regarding the XML DOM API and XPATH? What are pros and cons using either approaches? In terms of performance, what approach much better? Also, which approach can maintain the CDATA?
    Here is a sample of an XML. Please show some sample on how to get the values for SHOP element using both XML DOM API vs. XPATH.
    <FILTER>
    <USER_NAME></USER_NAME>
    <PROFILE>
    <SHOP>TOYS 'R US</SHOP>
    <SHOP>TONY & MARIE'S SHOP</SHOP>
    <SHOP>A HUGE STORE <Sample Name></SHOP>
    </PROFILE>
    </FILTER>
    Thank you in advance.

    Refer
    http://forums.oracle.com/forums/thread.jspa;jsessionid=8d922006ce6dda4555e27134d9c9502b63e2f3808d1.rQjwahaM-AXMmkbGngTxpQOUaNaKaxD3lN4OagSLb3mIaN8IbwSLa30Qn3qP-x4KbhiKbA8Omh8Q-wOSa30K8Oz1iNyKb2TRnk8LaN8IpR9vmQLz-AbJpgaTahaPbN8Kc3uxf2bdeNf+lQnJqBjHqNeL8QfznA5Pp7ftolbGmkTy?messageID=449186&#449186

  • Where are the XML/XSL APIs?

    Maybe I'm just looking in the wrong places, but I've been through all of the areas of Documentation on this site that might have a nice, downloadable javadoc API for the oracle XML parser and XSL Processor, but I cannot find them. Can anyone point me in the right direction?
    CS

    http://technet.oracle.com/docs/tech/xml/parser_java2/doc_library/index.html

  • XML diff in XML DB

    Hey All,
    Is there a mechanism for getting a diff of XMLTypes/documents in XML DB? Or is the best bet to make/load in my own implementation? Obviously, I don't want to reinvent the wheel if I don't have to.
    Thanks
    Tim

    Nothing in the current release :(...
    However if you are interested in joining the 11g Beta program we might be able to help.
    http://forums.oracle.com/forums/ann.jspa?annID=281

  • Urgent - Need an answer - XML Java API

    This is the 3rd time I've posted this question in last week - Oracle Support: How can I get an answer to this?
    This question is about how to free up the memory of XMLDocuments, Parsers, etc using the Java APIs - not the PLSQL wrappers.
    I'm writing an app using the DocumentSplitter class (from Steve M.'s book) that allows for the SAX parsing of large XML documents. But this question is really about the Oracle Java XML API.
    Is there a way to free the memory of each of the "temporary" XMLDocuments that get created? I know there's a XMLNodeCover.freeDocument(int id)
    method in the xmlplsql.jar- where do you get the id from? I'm trying XMLNodeCover.getDocumentId(curDoc) - but that doesn't seem to work.
    And can I use that same method for each Node and Element that gets created also?
    Also, would like to free the memory for the XSL processor, SAXParser, and XSLStylesheet - but this is even less obvious (although not as critical).
    I'm actually getting out-of-memory errors even sooner when using the SAX parser then when using the DOM parser, and I think its due to this issue.
    I know that there are PL/SQL wrappers for all these, but I'm trying to use the DocumentSplitter and associated custom classes
    in only Java stored procs, and then writing a single XSLT.transform wrapper. This way its largely invisible to the PLSQL layer.
    Thanks

    Hi - thanks for your response.
    Actually, yes, I did change the split method to return a CLOB. The big picture is I'm trying to use the DocumentSplitter
    class to assist in the transformation of large XML documents to html or tab-delimited output. Using the standard DOM parser,
    I eventually get an out-of-memory situation. So now I'm trying the DocumentSplitter to do a "mini" XSL transform on each <ROW>.
    The good news is it works for small to medium size reports. But its slower and runs out of memory quicker.
    Below is some of the relevant code. I also wrote associated classes to wrap the DocumentSplitter and to be the 'handler' that transfoms the XML when a <ROW> is found, and returns a string (see 'endElement' method below).
    I'm freeing the CLOBS in PLSQL after reading them - do I need to free them from JVM memory seprately? If so, how can I do that if I need to pass them to PLSQL?
    Thanks much,
    Eric
    // Split a large XML document into N subdocuments, each one identified
    // by the an opening 'splitElement' element. Invoke an XMLDocumentHandler
    // to process each subdocument encountered.
    public CLOB split(String splitElement, CLOB inputCLOB, CLOB outputCLOB)
    throws Exception, SAXParseException,SAXException,IOException, SQLException {
    this.inputCLOB = inputCLOB;
    this.outputCLOB = outputCLOB;
    this.splitOnElement = splitElement;
    // Create a new SAXParser
    SAXParser parser = new SAXParser();
    // Register the current instance of this class as the Document Handler
    parser.setDocumentHandler(this);
    // Create ascii stream from CLOB source
    InputStream inputStream = inputCLOB.getAsciiStream();
    // Start parsing the stream of XML
    parser.parse(inputStream);
    Writer out = this.outputCLOB.getCharacterOutputStream();
    // Set buffer to be the optimal size
    int chunk = outputCLOB.getChunkSize();
    char[] buffer = new char[chunk];
    // Create a reader from the output string
    StringReader reader = new StringReader(this.outputString);
    int length = -1;
    // Now write from output string to output CLOB
    while ((length = reader.read(buffer)) != -1) {
    out.write(buffer, 0, length);
    // Close streams
    reader.close();
    out.close();
    inputStream.close();
    return outputCLOB;
    portion of endElement method:
    // Handle the </Element> "end-element" parsing event
    public void endElement(String name) throws SAXException {
    // If we're NOT building a subdocument, we don't care. Just return.
    if (curDoc == null) return;
    // If this is the endElement event for the subdocument splitElement
    // then we're done with the subdocument and are ready to call the
    // handler to handle it.
    if (name.equals(splitOnElement)) {
    if (curDoc != null) {
    try {
    // Call the XMLDocumentHandler.handle() method for current subdoc
    //Append the output to the growing output string
    if (this.outputString == null) {
    this.outputString = handler.handleDocument(curDoc);
    } else {
    this.outputString = this.outputString + handler.handleDocument(curDoc);
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    }

  • XML diff - ignoring order

    I'm working a project which basically involves producing a diff of 2 XML files. I recently discovered XDK and though that this would be the best way to do this.
    However, after I implemented the XDK solution, I found that it makes a distinction between files with different node ordering, even when these are logically equivalent. The files I am operating on have no ordering guarantees. Is there a way to accomplish a logical (rather than physical) XML comparison using XKD? Or should I look at another product?

    How are you processing the XML? Are you passing XML directly to merge or are you using XML Agent to transform the data to field nominated? Are you applying an XSLT?

  • XML Diff escape/unescape

    When performing a diff between two xml files that may contain an escaped character i.e.
    <FIELD>This &amp; That</FIELD>
    The resulting xsl does not leave the & escaped producing invalid xml.
    <FIELD>This & That</FIELD>
    Is there some way to instruct the method to escape reserved characters or is the only solution to parse through resulting xsl and escape characters after the fact.

    Hi,
    You might want to try CDATA or the attribute <disable-output-escaping="yes"/>.
    Thanks,
    rajat

  • Why to use xml ,sax api ,?

    Dear friends
    1> Can u please tell me why to use xml instead of html. When the developement is
    easy & fast in html, then why peoples are going for xml.
    2> Please tell me role of SAX api in relevence to XML.
    3>What is difference between DOM & SAX.?
    If possible spare few seconds to write to me.
    regds
    shiv
    Email: [email protected]

    1> Can u please tell me why to use xml instead of
    html. When the developement is
    easy & fast in html, then why peoples are going for
    xml.
    HTML is only for presentations like web pages. XML, however, is use to define a new language like XHTML that is for presentations. But there are XML based language that is not for presentation, for example, XLink which allows elements to be inserted into XML documents in order to create and describe links between resources. All in all, XML is a much powerful language than HTML.
    2> Please tell me role of SAX api in relevence to
    XML.
    Simplely put, SAX is a XML parser like DOM that is used to process XML data.
    3>What is difference between DOM & SAX.?
    Take a look at this: http://java.sun.com/webservices/docs/ea2/tutorial/doc/JAXPIntro.html
    Hope this help.

Maybe you are looking for

  • Vendor Line Item not cleared after F110

    Hi Gurus, We encountered an issue. The payment run was processed last April 18 and the vendor invoices were captured during the payment run and in the aging report, these invoices didn't appear as Open Item. In between April 19 until August 19, these

  • Reading a variable from one method to another method

    I am pretty new to Java and object code, so please understand if you think I should know the answer to this. I wish to pass a variable from one method to another within one servet. I have a doPost method: public void doPost(HttpServletRequest request

  • Cannot find SOA Suite 11.1.1.2

    I download SOA suite 11.1.1.2 (ofm_soa_generic_11.1.1.2.0_disk1_1of1.zip), weblogic 10.3.2, and RCU 11.1.1.2. Then, I install them. However during SOA configuration, in the step of Generate a domain configured automatically to support the following p

  • Hyperion Reports - Row and Column templates

    <p>Sorry if this may be a bit basic but we are new to Hyperionreports. Currently we are going through a redesign process and washoping to get some viewpoints on the benefits of using row andcolumn templates within reports. I am looking at this option

  • Dial-up access on 2851

    disregard conversation