Xerces parser

hi
Is there anything wrong with the following code
The Document object returned by the code is always null
import java.io.PrintWriter;
import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.*;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class PushParser {
public static void main(String a[]){
try{
org.apache.xerces.parsers.DOMParser parser = new org.apache.xerces.parsers.DOMParser();
parser.parse(a[0]);
System.out.println(" parser==="+parser);
Document doc =parser.getDocument();
System.out.println(" doc==="+doc);
} catch(Exception exp){
System.out.println(" exp"+exp);
}

is the Document returned a null reference or is it a
document with a null value?
(and use javax.xml.parsers.DocumentBuilder, it's the
standard way to perform DOM parsing, xerces is
apaches' implementation)It was a document with a null reference and thanks for the suggestion

Similar Messages

  • How do you make Xerces parser generate doctype to XML-file?

    When I use javacode (with xerces parser) to update an XML-file the doctype-line disappears!!!!
    Anyone how knows how to solve this problem????
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE test SYSTEM "StatisticStandard.dtd"> <---- This is the line I want to keep!!!
    <test>
    <totalanswered>5</totalanswered>
    <set>
    <alt>1</alt>
    </set>
    </test>

    Hi!
    I found a sort of solution to my problem. I don't think it is the best, but it works!
    Where you write to file you add this line (look for the arrow).
    (I use the javax.xml.transform package)
    Source xmlSource = new DOMSource(document);
    Result result = new StreamResult(
    new FileOutputStream(path+file));
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.setOutputProperty(javax.xml.transform.OutputKeys.DOCTYPE_SYSTEM, "dtdfilename.dtd"); <-- This one does the trick!!!
    transformer.transform(xmlSource, result);
    Anette :)

  • Use of Xerces Parser in out application with Oracle App Server 9.0.4

    The problem in brief:
    Our product is a web-app that runs under various Application servers.
    One of our customers who uses Oracle App server, recently upgraded from 9.0.2 (9g) to 9.0.4 (10g), and our product no longer works with the latter version.
    Our product uses XML parser Xerces 1.1.
    In 9.02 it was possible to replace the App servers parser with Xerces 1.1. In 9.02 it was possible to replace the App servers parser with Xerces 1.1 (We modified the opmn.xml file, setting the Java options for our oc4j instance bootclasspath with xerces parser). Hence, our product works.
    In 9.0.4, apparently, Oracle moved to a different parser, and it no longer allows the parser to be replaced. If the bootclasspath is modified with XERCES(tested various versions of xerces) parser, rightfully so ORACLE Application server does not start.
    Unlike other prominent Application Servers (such as webshpere etc,) the Oracle application server does not support separate JVMs or namespaces for web-apps either.
    We like, oralce application server, OC4J instance for our application to use the xerces parser version qualified with our product. We understand, replacing the XML parser for the entire Oracle Application Server is not supported function.
    Since, Oracle Application Server is loading the oracle 'xmlparserv2' at system class path, though the applicaton has xerces.jar in application path (either in AppLib or web-inf/lib directory, Its not a class loading issue) it is not getting used (since javax.xml.parsers.documentbuilderFactory is mapped to oracle parser).
    So, it looks like the only option available to us is to modify our product to use Oracle's XML parser. This is a major software change, and we want to keep it as last resort option.
    Any suggestion and help will be higly appreciated.
    Perraju Nadakuduty (raju)
    E-mail:[email protected]

    Raju --
    Thanks for the intelligent posting on a difficult issue for you.
    I wasn't aware of anything specifically being introduced that prevented the bootclasspath technique from working** in the 904 release.
    For 904, the bootclasspath needs to be put in the start parameters tag of the java-options tag.
    <process-type id="home" module-id="OC4J" status="enabled">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" ... -Xbootclasspath/a:/java/lib/xerces.jar"/>
    </category>
    </module-data>
    </process-type>
    You can also try copying the xerces.jar into the jre/lib/ext directory so it's loaded by the system classloader and see if that works**. This will put xerces at the extension level so
    **these workarounds are not supported and will put you in an unsupported situation if a problem occurs.
    The good news is that have taken steps to clearly enable the separation of container versus appplication class spaces in thenext production release (10.1.3) of OC4J. We will be providing a new classloading model which cleanly separates the two namespaces and allows applications to provide their own versions or distributions of class libraries with no collisions with the OC4J runtime libraries.
    I don't know of any easy ways to do what you need -- other than reworking the app to use JAXP so that the parser implementation used is pluggable as you kind of allude to. If it was possible, I'd do that rather than hard coding in the use of the Oracle XML parser.
    But just to reiterate, switching in xerces at the bootclasspath level is not a supported operation since it may have an effect on the OC4J runtime operation.
    cheers
    -steve-

  • How to use Xerces parser in my code

    Hello all,
    This is my first time in the forumn. I am a beginer to xml. I am trying to use xerces SAX parser to parse the xml document. I have downloaded xerces 2.6.2 in the c drive. Can you please guide me how can I use it in my piece of code and how to execute. I tried using the parser available on my system. This code works fine. But I am confused with how can modify my code to parse using Xerces parser.
    Help appreciated!
    import javax.xml.parsers.SAXParserFactory;//This class creates instances of SAX parser factory
    import javax.xml.parsers.SAXParser;//factory returns the SAXParser
    import javax.xml.parsers.ParserConfigurationException;//if the parser configuration does not match throws exception
    /*2 statements can be substituted by import org.xml.sax.*;
         This has interfaces we use for SAX Parsers.
         Has Interfaces that are used for SAX Parser.
    import org.xml.sax.XMLReader;
    import org.xml.sax.SAXException;
    import java.io.*;
    import java.util.*;
    public class CallSAX_18 {
         public static void main (String []args)
                   throws SAXException,
                   ParserConfigurationException
                   IOException {
         /*     3 statement below can be substitued by this below 1 statement when using other parser
    XMLReader xmlReader = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
              SAXParserFactory factory = SAXParserFactory.newInstance();
              SAXParser saxParser = factory.newSAXParser();
              XMLReader xmlReader = saxParser.getXMLReader();
              /*/MyContentHandler has callback methods that the SAX parser will use.This class implements startElement() endElement() etc methods.
              DBContentHandler dbcontent = new DBContentHandler();
              xmlReader.setContentHandler(dbcontent);
              xmlReader.parse(new File(args[0]).toURL().toString());

    Well, I am not too familiar with SAX, but I know my DOMs 8-)
    is there a reason you are using SAX to parse versus DOM?
    what is your final objective that you want to accomplish? Perhaps
    DOM might be better? Are you trying to parsing XML into nodes?

  • Question About Xerces Parser and Java  JAXP

    Hi,
    I have confusion about both of these API Xerces Parser and Java JAXP ,
    Please tell me both are used for same purpose like parsing xml document and one is by Apache and one is by sun ?
    And both can parse in SAX, or DOM model ?
    Is there any difference in performane if i use xerces in my program rather then JAXP, or is ther any other glance at all.
    Please suggest some thing i have and xml document and i want to parse it.
    Thanks

    Hi
    Xerces is Apaches implementation of W3C Dom specifiacation.
    JAXP is a API for XML parsing its not implementation.
    Sun ships a default implementation for JAXP.
    you have factory methods for selecting a parser at run time or you can set in some config file about what is the implementaion class for the SAXParser is to be chosen (typically you give give the class file of xerces sax parser or dom parser etc..)
    go to IBM Developerworks site and serch for Xerces parser config. which have a good explination of how to do it.
    and browse through j2ee api .may find how to do it.

  • Xerces Parser... Please Help.

    Hello,
    I have a problem when I use the XERCES Parser.
    I want to generate a Option FieldType of a HTMLForm.
    My code is:
    Element select = sourceDoc.createElement("select");
       select.setAttribute("name", name);
       select.setAttribute("required", required);
       if (Numitems > 0){
        for(int k=0;k<Numitems;k++){
           Element option = sourceDoc.createElement("option");
           option.setAttribute("value", items[k]);
         select.appendChild(option);
    }and then generate:
    <select name="form/camp1" required="true" value="">
    <option value="hola"/>
    <option value="adeu"/>
    <option value="peich"/>
    </select>
    But I want that the parser result could be:
    <select name="form/camp1" required="true" value="">
    <option value="hola" HOLA </option>
    <option value="adeu" ADEU </option>
    <option value="peich" PEICH </option>
    </select>
    How can I do it??
    Thank you.
    PD:Excuse me my English.

    As I understand you want to add a text to your node.
    option.appendChild(sourceDoc.createTextNode(items[k]));
    that should do it

  • Creating spreadsheets using xerces parser

    Hi,
    Is it possible to creat spreadsheets(displaying xml as xls) using xerces parser?
    If its possible please tell me the way to do.

    In APPLET tag in your HTML page specify all dependent jar names in ARCHIVE attribute. At server side put dependent jars along with your applet jar.
    Thanks,
    Mrityunjoy
    Edited by: mrityunjoy on 5 Mar, 2009 12:56 PM

  • Xerces - Parse XML from String

    I am trying to parse an xml string using Xerces.
    I have the following code:
    String xml = <segments meters="8643" seconds="538" distance="5.4 mi" time="8 mins"><segment id="seg0"  pointIndex="0" meters="122" seconds="11"  distance="0.1 mi"  time="11 secs">Head  <b>southwest</b> from <b>B Ave NE</b>
    </segment>
    <segment id="seg1" pointIndex="2" meters="239" seconds="22" distance="0.1 mi" time="21 secs">Turn <b>left</b> at <b>19th St NE</b></segment>
    <segment id="seg2" pointIndex="5" meters="2985" seconds="192" distance="1.9 mi" time="3 mins">Turn <b>right</b> at <b>1st Ave NE</b></segment>
    <segment id="seg3" pointIndex="43" meters="3280" seconds="211" distance="2.0 mi" time="3 mins">Continue on <b>1st Ave SW/1st Ave NW</b></segment>
    <segment id="seg4" pointIndex="96" meters="158" seconds="10" distance="0.1 mi" time="10 secs">Bear <b>right</b> at <b>US-151-BR S</b></segment>
    <segment id="seg5" pointIndex="102" meters="1859" seconds="93" distance="1.2 mi" time="1 min">Turn <b>right</b> at <b>16th Ave SW</b></segment>;
    XMLReader reader = new SAXParser();
    reader.setContentHandler(new Handler());
    reader.parse(xml);I am getting the followoing error:
    org.xml.sax.SAXParseException: File "<segments meters="8643" seconds="538" distance="5.4 mi" time="8 mins"><segment id="seg0" pointIndex="0" meters="122" seconds="11" distance="0.1 mi" time="11 secs">Head  <b>southwest</b> from <b>B Ave NE</b></segment><segment id="seg1" pointIndex="2" meters="239" seconds="22" distance="0.1 mi" time="21 secs">Turn <b>left</b> at <b>19th St NE</b></segment><segment id="seg2" pointIndex="5" meters="2985" seconds="192" distance="1.9 mi" time="3 mins">Turn <b>right</b> at <b>1st Ave NE</b></segment><segment id="seg3" pointIndex="43" meters="3280" seconds="211" distance="2.0 mi" time="3 mins">Continue on <b>1st Ave SW/1st Ave NW</b></segment><segment id="seg4" pointIndex="96" meters="158" seconds="10" distance="0.1 mi" time="10 secs">Bear <b>right</b> at <b>US-151-BR S</b></segment><segment id="seg5" pointIndex="102" meters="1859" seconds="93" distance="1.2 mi" time="1 min">Turn <b>right</b> at <b>16th Ave SW</b></segment></segments>" not found.
         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1219)
         at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:501)
         at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1139)
         at com.shiftyeyes.xmlTest.main(xmlTest.java:34)
    Exception in thread "main" anyone know how I can fix this? Thanks!!

    reader.parse(new InputSource(new StringReader(xml)));

  • Nested Xerces parsing

    Hi,
    I use org.apache.xerces.parsers.SAXParser for parsing of XML document. I catch events startDocument() ...
    One element contains nested xml structure like this :
    <a>
    <b>2008-01-23T07:58:00.000</b>
    <id>8989</id>
    <idD>https://xxx.xxx.com/aaa/doc/Document?idDokument=2690</idD>
    *<comment>*
    <?xml version = '1.0' encoding = 'UTF-8'?> <tns:event xmlns:tns="http://xxx.xxx.com/comment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http:/xxx.xxx.com/comment https://xxx.xxx.com/comment.xsd" verzeXsd="1"><aa>xxx</aa><bb><cc>xxxx</cc></aa></tns:event>
    *</comment>*
    <idA>xxxx</idA>
    </a>
    How I can parse elements inside "comment" (aa, bb,cc) ?
    Thanks in advance.

    Well, what you posted isn't well-formed XML (you can't have an XML prolog in the middle of a document). But perhaps your document actually looks like this and you just allowed the forum software to remove the escaping without fixing it:
    <comment>
    &lt;?xml version = '1.0' encoding = 'UTF-8'?&gt; &lt;tns:event xmlns:tns="http://xxx.xxx.com/comment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http:/xxx.xxx.com/comment https://xxx.xxx.com/comment.xsd" verzeXsd="1"&gt;&lt;aa&gt;xxx&lt;/aa&gt;&lt;bb&gt;&lt;cc&gt;xxxx&lt;/cc&gt;&lt;/aa&gt;&lt;/tns:event&gt;
    </comment>
    If that's the case then you're just going to get the contents of the <comment> element as a single text string. So you question is how to parse an XML document from a String? I've seen that question here a few hundred times. Pass new InputSource(new StringReader(string)) to a new parser.

  • SAX  ..crimson parser vs xerces parser..does changing parsers help

    Hello ...I relatively new to XML technology.My question is does changing parsers from say crimson to xerces(or such...) improove the performance of an application.Our application is faced with a performance problem and I was wondering if changing parsers has a substantial affect..if at all ther is any.
    Thanks so much for your time.
    ----

    Try it and see. Asking people to predict the
    performance of code they know nothing about is
    pointless.I understand what you say ...thats true .But the application I am working on takes around 16 hours to finsh(It actually loads data to a remote server and I cant test it many times).Before trying with different parsers ...I wanted to know if it is worth doing that .
    Thanks again.....

  • Xerces parser and Reader Types ?

    Hi
    I came to know that Xerces uses buffering data reader by deafult and one override it with a streaming reader ( for jabber see jabber.org ) by creating and installnig a custom reader factory that extends DefaultReaderFactory.
    I am really not so sure about the different techniques ... "buffering data reader " and "Streaming DataReader" ??
    Can some one pls elaborate or pointme to relevent links ??
    Regards
    Lavnish

    Till now there is no excat parsers for validating schema.Only oracle parsers do some validation.

  • How can I use a 3rd party XML parser such as xerces with OC4J ?

    Hi all tech experts,
    I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
    installed Portal and Wireless and OracleAS Infrastructure on the same
    computer.
    i tried all the solutions on this thread
    Use of Xerces Parser in out application with Oracle App Server 9.0.4
    but still fighting.
    I have also posted this query on OTN on following thread
    How can I use a 3rd party XML parser such as xerces with OC4J?
    but no reply....
    Please help me on this issue.
    Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
    i have read the following article which states that
    OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
    The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
    It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
    If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
    i have also run the following command
    java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
    but no success.
    How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
    All reply will be highly appreciated.
    Thnx in advance to all.
    Neeraj Sidhaye
    try_catch_finally @ Y !

    Hi Neeraj Sidhaye,
    I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
    Thanks for your help.
    Xingsheng Qian
    iPass Inc.
    Here is the error message I got.
    Message:
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
    Stack Trace:
    org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.initModels(Unknown Source)
         at org.chiba.xml.xforms.Container.init(Unknown Source)
         at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
         at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
         at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.init(Unknown Source)
         at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
         at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
         at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
         ... 18 more

  • Why can't Oracle XML parser import a Xerces node?

    I have been using XSU to obtain query results in XML as a DOM. Recently I tried to use the Document.importNode method on the generated DOM where the node to be imported was generated using the Xerces parser. The Oracle XML parser gave the following error:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredElementImpl
         org.w3c.dom.Node oracle.xml.parser.v2.XMLDocument.importNode(org.w3c.dom.Node, boolean)
              XMLDocument.java:1247
    I can get around the problem by parsing the XML I want to combine with the XSU generated XML with the Oracle parser, however, I would be happier if I could configure XSU to use Xerces (or another parser) via JAXP.
    Will XSU have JAXP support? What is the cause of the exception above?
    Gary Brown
    Analyst/Developer
    University of Bristol

    I have been using XSU to obtain query results in XML as a DOM. Recently I tried to use the Document.importNode method on the generated DOM where the node to be imported was generated using the Xerces parser. The Oracle XML parser gave the following error:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredElementImpl
         org.w3c.dom.Node oracle.xml.parser.v2.XMLDocument.importNode(org.w3c.dom.Node, boolean)
              XMLDocument.java:1247
    I can get around the problem by parsing the XML I want to combine with the XSU generated XML with the Oracle parser, however, I would be happier if I could configure XSU to use Xerces (or another parser) via JAXP.Different implementation have different internal representation of DOMNode. That is why you can't import.
    Will XSU have JAXP support? What is the cause of the exception above?Why you need this? Any requirement from your application?
    Gary Brown
    Analyst/Developer
    University of Bristol

  • Extracting elements from an xml string - org.apache.xerces.dom.DeferredText

    Hello all,
    I am new to xml, and I thought I had a handle on things until I got this problem...I am getting an xml string from the body of an e-mail message, and then I am trying to extract elements out of it. Here is an example xml string:
    <?xml version="1.0" encoding="UTF-8"?>
    <filterRoot>
       <filter action="MOVE" bool="AND" name="My Saved Filter" target="Deleted Items">
          <condition attribute="TO" bool="AND" contains="CONTAINS">
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
          </condition>
       </filter>
    </filterRoot>I am trying to extract the <filter> element out and store it into a Vector of Elements (called, not surprisingly, filters). However, I am getting a class cast exception:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredTextImplIt is being called from where I trying to extract the <filter> in this way:
            filterRoot = doc.getDocumentElement(); // get topmost element
            NodeList list = filterRoot.getChildNodes();
            Vector newFilters = new Vector();
            debug("There are "+list.getLength()+" filters in document");
            for(int i=0; i<list.getLength(); i++) {
                Node n = list.item(i);
                debug("Node "+i+" getNodeValue() is "+n.getNodeValue());
                Element temp = (Element)n;
                newFilters.add(temp);
            }Perhaps my question is, how do I correctly get hold of the <filter> node so that I may cast it as an Element?
    thanks,
    Riz

    Yes, I already knew that it is not a bug.
    But, I got next step problem.
    I put "false" to "include-ignorable-whitespace" feature in xerces parser.
    But, I still found unnecessary TextNodes in my parser object.
    Feature link : http://xerces.apache.org/xerces-j/features.html.
    I use xerces-2_8_0.
    DOMParser parser = new DOMParser();
    parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
    parser.parse(inputSource);
    document = ps.getDocument();
    System.out.println(document.getDocumentElement().getChildNodes().length()); // still wrong lengthIs tehre any example of usage this feature?
    What is default defination of white-space "\n "(enter with one space) or " "(juz white space) or something else?
    Thanks,

  • Need Suggestion on the xml parser to be used in weblogic env.

    Hi All,
    1. I would like to know what is the parser suggested to be used when our application is running in the weblogic env. We have xerces parser already shipped in along with jdk and oracle's xdk parser is also available in the env.
    Kindly let me know what is the suggested one to use?
    2. In one of our applications, jaxp factory (javax.xml.parsers.DocumentBuilderFactory) is explicitly set to xerces's (com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl).
    Now when we changed it to use oracle xdk parser (oracle.xml.jaxp.JXDocumentBuilderFactory), We are running in to issues like 'IllegalArgumentException :not able to set Schema in setAttribute()' as a File Type.
    Previously, we used to set the Schema as File Type when xerces parser is used and that used to work fine.
    Kindly let me know the way which is accepted by both the parsers.
    Thanks
    Rajesh

    Use the default parser.
    By default, WebLogic Server is configured to use the default parser and transformer to parse and transform XML documents. The default parser and transformer are those included in the JDK 5.0.
    The built-in WebLogic Server DOM factory implementation class is com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.
    The DocumentBuilderFactory.newInstance method returns the built-in parser.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

Maybe you are looking for

  • What exactly are Logical Database in Programs?

    Hi Experts,    While digging deep into the programs, using the T-Code SE93/SE38, we come across Logical Database. what is the functionality and use of this Logical Database? Best Regards,

  • CD/DVD drive keeps on opening and closing automatically.

    Hi, I just got my computer today and hooked it up.  The first time I hit the 'power' button after having everything hooked up, the CD/DVD drive started making this clunking noise and then procceded to open and close, open and close numerous times.  S

  • New email server batch reports no longer email

    We have a new email server. I've checked all of the places in prod where I found on the forums that were places the mail server should have been set and have found nothing in prod. I searched files in unix and found only one file, WorkflowEngine.prop

  • Help I'm new to Skype

    I recorded a video msg and the reciever never got it. Yet I can play it on my profile n there's even a timestamp but he never got my video. Is it possible to resend it bcz I cannot seem to figure it out! Heeeelp pls... Oh and I'm on my phone skyping

  • Display date & time

    Hi, I have a few reports embedded in WAD. Now my requirement is to display the current date and time and also the date and time of the most recent data upload. How do I achieve this? Kindly assisst. Thanks. Darius.