Which XML Parser gives best performance? Please respond!!

Hi,
I am trying to figure out what is the best performing XML parser. I know that SAX implementation is good for XML reading and DOM is good when building XML documents.
Now, I want to know which parser (JAXP? JDOM? Piccolo?) I understand that JAXP underneath uses Xerces and SAX2. Is it right?
Is it a good practice to have a single application using a SAX parser for reading xml docs and a DOM parser to build xml parser?
We are also planning to migrate from Apache Soap to Apache Axis. Do you have any recommendations?

I think JAXP is an API, not a parser. It uses an underlying parser called Crimson by default. If you want it to use other parsers you can configure it to do so. I can't tell you which parser is more fastest.
The easiest way of reading and writing XML documents is to use an XML data binding library such as JAXB or castor. It's much nicer than implementing the SAX callback methods or building document trees. The steps involve are...
1. Write an XML Schema
2. Tell the XML data binding tool to generate the source code to marshall / unmarshall XML documents to and from java objects
3. Compile the source code
4. Package the classes into a library
5. Use the library in your application
Steps 2-4 can be added into your build script.
It may take you a couple of days to become familiar with the tools, but will save you weeks of maintenance & debugging.

Similar Messages

  • How do I access "Firefox is NOT compatible with this application. For best performance, please use Internet Explorer 5.0 and above...." web sites; when I try to download any alternate browser, then a warning that alternate is "imcompatable with your opera

    How do I access websites that warn: "Firefox is NOT compatible with this application. For best performance, please use Internet Explorer 5.0 and above...."? When I try to download any alternate browser, all I get is another warning that the alternate is "not compatible with your operating system." Is Firefox preventing this? The site listed below is a job application site. I've had this same problem with other job application sites also.
    == URL of affected sites ==
    https://storefront.kenexa.com/lithia/cc/Home.ss

    There should be a User Agent Switcher menu item under Tools, which gives you the browser names you can impersonate.
    The menu item name changes to the browser UA you are presently using.
    There is also a User Agent Switcher button, you can add it using View -> Toolbars -> Customize, and dragging the button to your toolbar.
    See http://chrispederick.com/work/user-agent-switcher/features/ and http://chrispederick.com/work/user-agent-switcher/help/
    You can just start trying IE versions (or the versions it says on the site) until it lets you in.

  • File Adapter or File  Transport which one will give more performance

    Hi all,
    File Adapter or File Transport which one will give more performance ? in OSB?
    Which one to select any one did performance analysis?
    Thanks
    Phani

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • Which XML parser is built into JDK1.4.2 ?

    Which XML parser is built into JDK1.4.2 ?
    Is it Crimson, Xerces ?
    Do you know which version ?
    When using inbuilt XML parser with JDK 1.4.2 which API shoudl I look at ?
    Is it only the standard JDK API at http://java.sun.com/j2se/1.4.2/docs/api ?

    X-post:
    http://forum.java.sun.com/thread.jsp?thread=524180&forum=136&message=2511345

  • Question: Which XML parser is built into JDK14.2?

    Is it Crimson, Xerces ?
    Do you know which version ?
    When using inbuilt XML parser with JDK 1.4.2 which API shoudl I look at ?
    Is it only the standard JDK API at http://java.sun.com/j2se/1.4.2/docs/api ?

    It is crimson and its version is 1.1.3

  • Which XML parser for WLS6.1

    I heard BEA's Scott Dietzen at JDJEdge (
    http://www.sys-con.com/jdjedge/tv4.cfm ) say that the XML parser used by
    WebLogic's web services stack is native (not java). Question - which parser
    is it? BEA's own work? Or xp? or...?
    do I care?

    I think you may have misinterpreted the meaning of "native" ;-)
    WLS 6.1 comes with a Java-based, SAX Parser built by BEA engineers. It is included
    in the client.jar file created during the Web service assembly process. It is
    JAXP-complaint, and definitely Java.
    Regards,
    Mike Wooten
    "dc" <[email protected]> wrote:
    I heard BEA's Scott Dietzen at JDJEdge (
    http://www.sys-con.com/jdjedge/tv4.cfm ) say that the XML parser used
    by
    WebLogic's web services stack is native (not java). Question - which
    parser
    is it? BEA's own work? Or xp? or...?
    do I care?

  • XML Parsing with XSL Performance lag

    Hi there
    I should qualify this post by saying I am fairly new to EJB's and have based the below on a Java Working with XML Tutorial I read.
    I have an EJB which is being developed to parse XML documents with an XSL stylesheet and return HTML for display. The code is working fine however there is a fairly hefty performance lag when using the EJB to generate the HTML as opposed to the straight HTML. I am getting an average response time of 95000ms using the EJB as opposed to 45000ms when viewing the straight HTML. The code I am using to do the parsing is :
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(dataFile);
    // Convert docs into StreamSource
    StreamSource stylesource = new StreamSource(styleSheet);
    StreamSource source = new StreamSource(dataFile);
    StringWriter strWrite = new StringWriter();
    StreamResult result = new StreamResult(strWrite);
    // Use a Transformer for output
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(stylesource);
    transformer.transform(source, result);
    There is then some error handling and the strWrite object is placed into an array to be returned.
    I am really looking to find out if the performance lag I am experiencing is normal or if there is anything I can do to improve the speed of the code.
    All comments and help is most appreciated.
    Cheers
    Justin.

    You should be able to increase performance by caching Templates objects in memory as a previous post suggested.
    Here is some untested code:public final class TransformerCache
         private static Map cache = new Vector();
         private TransformerCache(){}
         public static Transformer getTransformer( String filename )
              if( ! cache.containsKey( filename ) )
                   TransformerFactory tf = TransformerFactory.newInstance();
                   Templates template = tf.newTemplates( new StreamSource( filename ) );
                   cache.put( filename, template );     
              return ( ( Templates ) cache.get( filename ) ).newTransformer();
    }This aproach works in a clustered environment, just bear in ming that there will be an instance of the cache on each server instance (virtual machine).

  • Which XML parser is used by JWSDP?

    Hi,
    SOAP messages are xml messages. I know that the SOAP messages are processed before invoking the web service. what parser is used to process the SOAP message at the service side. Is it a DOM parser or a SAX parser?? Can i make the server use another parser.??
    Regards,
    Kartik.

    There are standard ways of causing a particular parser to be used. You will find a list of them in the API documentation for the newInstance() method of SAXParserFactory and DocumentBuilderFactory.
    Personally I don't understand why you care what parser is used to parse the message. You don't say that there is any problem with it, so why do you ask?

  • IPhone app, video files and compression which size/format gives best outcome

    Developers,
    I have a series of video files that I want to integrate directly into an app ( I.e. The are contained within the app rather than streamed).  The files are currently .mov and have quite a large size ~50mb per file at full hd resolution.
    I wondered If anyone has had some success driving down the file size (in Mbs) but maintaining quality in their apps? Or know of other supported file formats that might allow for this?
    All comments welcome,
    With thanks,
    James

    Try h.264 sized appropriately and build using UIWebView and HTML5.

  • ANN: XML Parser for Java v1.0.1.3

    A new maintenance release of the Oracle Parser for Java is
    available for download. It has the following fixes and changes:
    Bug fixes for #860330, XML parser cannot parse documents with
    stylesheet PI's in them;
    #860329, XML parser gives errors in validate mode if doc doesn't
    have a DTD;
    #856914, XML document should accept a java.io.printwriter; and
    some enhancements were made to optimize performance in the non-
    validating mode.
    This is the third production patch release. Oracle XML Parser
    1.0.1.2.0
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    Hi,
    Are you sure I can use the downloaded XML Parser for C v2 on Oracle 7.3 and Oracle 8? Because in the lib directory there are the following libraries:
    libcore8.a, libnls8.a, libxml8.a, libxmlc8.a
    I think they are for Oracle 8i instead. I tried to compiled the Oracle XML Parser for C v1.0.0.0.1 before on Oracle 7.3 and it failed because of libraries problem. How can I get the libraries required for Oracle 7.3 and Oracle 8? Please verify.
    Many thanks!
    Francis

  • XML Parser Problem

    am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> execute domsample('c:\xml', 'family.xml', 'errors.txt');
    begin domsample('c:\xml', 'family.xml', 'errors.txt'); end;
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 22
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 79
    ORA-06512: at "COMMODITYBACKCONNECT.DOMSAMPLE", line 80
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL>
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
    5 ;
    CLASS STATUS
    oracle/xml/parser/v2/DOMParser VALID
    oracle/xml/parser/v2/DOMParser VALID
    Please advice to how remove the following error:
    ORA-20100: Error occurred while parsing: No such file or directory

    Found the solution on metalink. There is a file under /$ORACLE_HOME/javavm/install/init_security.sql
    which needs to be run under username where you are installing xml parser.
    This step is not in readme.txt file provided as a part of download from the OTN website.

  • Which one will give more power C2D 2.93 vs i5 2.4

    Any one can inform me which one will give more performance MBP C2D 2.93 with NVIDIA GeForce 9400M + 9600M GT with 512MB or MBP i5 2.4 with 330M 256MB
    I want it for photos and movies editing ?

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • Since installing the latest update, Firefox will not load; it gives me the following error -- XML Parsing Error: not well formed.

    since installing the latest update, Firefox first operated with some errors but now will not load at all; it gives me the following error --
    XML Parsing Error: not well formed
    locations chrome://browser/content/browser.xml
    Line Number 1191, column 20:
    utton id="back-forward-dropmarker" type="menu" chromedir="&locale.dir;"-------------------
    please note that the words "utton ID" are exactly as the error message gives it; and at the end of the message there are exactly 19 hyphens.
    I don't know why this faulty code is referencing things to do with "chrome"... the Chrome browser is not installed on this PC or anywhere on our network.
    Also, this is not the first problem I had after clicking Firefox's prompt for the latest update. Before Firefox retreated into this error message, it was loading but running with some faults...
    1. the bookmark symbol was not appearing on the right hand side of the URL line, so I had always to click on "bookmark this page", after which the bookmark symbol did appear; however I don't know if the bookmarking function worked properly.
    2. the back and forward buttons were not highlighted, as if I had not come from a previous page; so once I clicked on a link to a new page I could not go back to where I came from because Fiefox thought I hadn't come from anywhere.
    3. there may have been other errors, but I did not find them.
    How do I reinstate my Firefox program to work properly please? do I have to download the latest version and reinstal? if so, do I have to remove the old version first? or is there a fix?
    Even to write this message I have been forced to use (yuk -- I don't like to say this!!!) Internet Explorer. So please -- I need help urgently.
    Thanks,
    NOEL

    Some how I solved my problem by opening a user account and downloading Firefox 4.0 beta and installing it, I did try it, worked fine, so I did close the user account and did go back to my own account(switched user), the main page that I had problem with Firefox which would not open, I dabble click on Firefox it start working again!! I hope that solves your problem too.
    firefox will not open, it gives me this cod and would not turn off, Error on switching in renew: NS_ERROR_UNEXPECTED, Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref] id: none

  • Xml parser procedur which worked in oracle 8.1.7 not working in oracle 9ir2

    hi all,
    THE BELOW PROCEDURE TO PARSE A XML WEB PAGE AND RETRIEVE THE DATA INTO TABLE IS WORKING WELL IN ORACLE 8.1.7 , BUT WHEN WE UPGRADED TO oRACLE 9I RELEASE 2 ,,ITS NOT WORKING AND GIVING THESE ERRORS,,
    13:44:56 Error: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-06512: at "SYS.XMLNODECOVER", line 0
    ORA-06512: at "SYS.XSLPROCESSOR", line 500
    ORA-06512: at "XXCNA.XRATESDLOAD", line 37
    ORA-06512: at line 2
    CAN ANYONE GIVE A TIP?
    REGARDS,
    VIJAY
    CREATE OR REPLACE PACKAGE BODY XRATESDLOAD AS
    PROCEDURE XRATESDLOADP
    IS
    --DECLARE THE REQUIRED XML PARSER, DOM DOCUMENT,NODES AND NODELLISTS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    --CREATE A PL/SQL TYPE TABLE
    TYPE tab_type IS TABLE OF CNA_XRATES_TEXT%ROWTYPE;
         t_tab tab_type := tab_type();
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    -- Parse the document and create a new DOM document.
    xmlparser.parse(v_parser, 'http://www.xe.com/dfs/datafeed2.cgi?cnaeuropeholdingsltd');
    v_doc := xmlparser.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the CURRENCY nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/xe-datafeed/currency');
    dbms_output.put_line( 'Currency rates processed on '||to_char(sysdate));
    --DELETE THE RECORDS IN THE CNA_XRATES_TEXT
    delete from CNA_XRATES_TEXT;
    dbms_output.put_line( 'Previous records of CNA_XRATES_TEXT table deleted '||to_char(sysdate));
    -- Loop through the list and create a new record in a tble collection
    -- for each CURRENCY record.
    FOR cur_emp IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, cur_emp);
    t_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    t_tab(t_tab.last).CURRENCY_SYMBOL := xslprocessor.valueOf(v_n,'csymbol');
    --t_tab(t_tab.last).CURRENCY_NAME     := xslprocessor.valueOf(v_n,'cname');
    t_tab(t_tab.last).CURRENCY_RATE := xslprocessor.valueOf(v_n,'crate');
         --t_tab(t_tab.last).CURRENCY_DATE       := xslprocessor.valueOf(v_n, sysdate);
    END LOOP;
    -- Insert data into the real CNA_XRATES_TEXT table from the table collection.
    -- Form better performance multiple collections should be used to allow
    -- bulk binding using the FORALL construct but this would make the code
    -- too long-winded for this example.
    FOR cur_emp IN t_tab.first .. t_tab.last LOOP
    INSERT INTO CNA_XRATES_TEXT
    (CURRENCY_SYMBOL,
    CURRENCY_RATE,
         CURRENCY_DATE)
    VALUES
    (t_tab(cur_emp).CURRENCY_SYMBOL,
    t_tab(cur_emp).CURRENCY_RATE,
         to_char(sysdate));
    END LOOP;
    dbms_output.put_line( 'Currency rates inserted into CNA_XRATES_TEXT table on '||to_char(sysdate));
    COMMIT;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    xmldom.freeDocument(v_doc);
    END XRATESDLOADP;
    END XRATESDLOAD;
    /

    Unlike Oracle 7.x, versions 8 and above now internalize the trigger you are looking for within the database itself. So you can no longer have the kind of control over this process as you would have done previously, however the performance has increased according to Oracle.
    It is possible to remove these triggers in an emergency as follows:
    -- if tab$.trigflag != 0 - then Oracle internal replication triggers are enabled
    select * from tab$ where trigflag != 0;
    -- to remove Oracle internal replication triggers if replication is not working
    -- and needs to be removed in an emergency to allow writing to the tables
    -- also do this as sys user
    run catrepr
    -- also do this as sys user
    update tab$ set trigflag=0 where trigflag !=0;
    commit;
    shutdown immediate;
    startup
    However this removes all of the triggers - which is not what you want to do in your situation.
    You may find some additional helpful commands in the repdoc.txt file on my website:
    http://www.dotcomsolutionsinc.net/products/repgen/repgen_example_repdoc1.html
    And here is a list of replication setup scripts which could be helpful as well:
    http://www.dotcomsolutionsinc.net/products/repgen/repgen_files.html
    What is expecially important (as I am sure you know) is the setup of conflict resolution, which I do a little bit differently than I have seen documented elsewhere in order to avoid ORA-1403 errors.
    David Simpson
    www.dotcomsolutionsinc.net
    (Oracle Replication Consulting & Tools)

  • What is the best api for xml parsing?

    I think that api comes with j2se is not that good for xml parsing. is there any open source api which is simple,easy and powerful,

    JArsenic wrote:
    Hey I feel XMLBeans would be a optimal solution for XML parsing as I provides you a whole set of methods to parse your XML tags as Java Objects. And you may download XMLBeans @ http://xmlbeans.apache.org/.
    What advantage would that have over JAXB? It already can do all that and is built into Java itself, so you don't need a separate download.
    Also: mapping XML to Java beans is a very specific way of handling XML and is definitely not "the best" in all situations.
    For similar quest you may reach @ [somesite]Please, no advertisement here, read the Code of Conduct that you agreed on singing up with this page.

Maybe you are looking for

  • Switch JSON data file based on selected language

    I would like to switch my json file that contains the data for my app based on the language selected. Basically that would mean changing the data uri to point to the new uri when the language is changed: Uri dataUri = new Uri("ms-appx:///DataModel/Sa

  • I can't purchase a movie in iTunes Store

    For the last couple of days, I've been trying to purchase a movie (or two) from iTunes Store but it seems to lockup every time. I use a Mac mini 2012 computer as a media base and have purchased dozens of movies from the Store over the years onto this

  • Need help identifying problem (lockup/freezing in Warcraft III & CS)

    my macbook pro: Model Name: MacBook Pro 15" Model Identifier: MacBookPro1,1 Processor Name: Intel Core Duo Processor Speed: 2 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache (per processor): 2 MB Memory: 1 GB Bus Speed: 667 MHz Boot ROM

  • PHP and Apache, Bah Humbug

    Setting up PHP and Apache, I was following this: http://developer.apple.com/mac/articles/internet/phpeasyway.html I did the step to turn on "web sharing", and the "your computers website" link opened up the local page no problem. When I copy and past

  • Using remote storage with iPhoto and a laptop

    Hi, I'm considering moving my iPhoto library to a NAS hard disk. I am accessing this from a laptop and wanted to see if iPhoto can do this. What happens when I'm away from my home network and I open iPhoto which it won't have access to the remote dis