XML files containing huge string

Hi,
I'm trying to read in a huge string from an XML file (the string is an encoded file e.g. a video - ideally I want to read in a file over 100MB if possible) It seems fine for small files, but large ones give me the 'out of memory' error, apparently when creating the XML document.
I gather it's best to use SAX parser rather than DOM for large files to avoid this; however I'm already using SAX. Does anyone have a suggestion as to where I might be going wrong? Maybe there's a better way to store the string in the XML? At the moment it's just an attribute of an object.
I'm very new to XML and would greatly appreciate anyone's advice here!
Thanks a lot,
Kat

create content handler by over riding defaulthandler. Append to StringBuufer the content you require that way you can recreate chunks you require. Like this
class myContentHandler extends DefaultHandler
StringBuffer sb = new StringBuffer();
public void startElement(String uri,String localName,String qName,
Attributes attributes) throws SAXException
sb.append("<").append(qName).append(">");
public void endElement(String uri, String localName, String qName) throws SAXException
     sb.append("</").append(qName).append(">");
     if ( qName.equalsIgnoreCase("endtag"))
          System.out.println(sb);
public void characters(char[] ch, int start, int length) throws SAXException
sb.append(XmlUtil.encodeXmlSpecialChars(ch,start,length));
Call Sax Parser ==>
SAXParserFactory parserFactory = SAXParserFactory.newInstance();
SAXParser parser = parserFactory.newSAXParser();
parser.parse("myfile.xml",new MycontentHandler());

Similar Messages

  • ESB/File Adapter - XML files containing multiple messages

    Hi,
    In all the examples on file adapters I read, if files contain multiple messages, it always concerns non-XML files, such as CSV files.
    In our case, we have an XML file containing multiple messages, which we want to process separately (not in a batch). We selected "Files contain Multiple Messages" and set "Publish Messages in Batches of" to 1.
    However, the OC4J log files show the following error:
    ORABPEL-12505
    Payload Record Element is not DOM source.
    The Resource Adapter sent a Message to the Adapter Framework which could not be converted to a org.w3c.dom.Element.
    Anyone knows whether it's possible to do this for XML files?
    Regards, Ronald

    Maybe I need to give a little bit more background info.
    Ideally, one would only read/pick-up small XML documents in which every XML document forms a single message. In that way they can be processed individually.
    However, in our case an external party supplies multiple messages in a single batch-file, which is in XML format. I want to "work" on individual messages as soon as possible and not put a huge batch file through our ESB and BPEL processes. Unfortunately we can not influence the way the XML file is supplied, since we are not the only subscriber to it.
    So yes, we can use XPath to extract all individual messages from the XML batch-file and start a ESB process instance for each individual message. But that would require the creation of another ESB or BPEL process which only task is to "chop up" the batch file and start the original ESB process for each message.
    I was hoping that the batch option in the File adapter could also do this for XML content and not only for e.g. CSV content. That way it will not require an additional process and manual coding.
    Can anyone confirm this is not supported in ESB?
    Regards,
    Ronald
    Message was edited by:
    Ronald van Luttikhuizen

  • TS4605 Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Well, iCloud has nothing to do with this.
    Do you have the built-in backup function Time Machine running on your Mac?
    See: http://support.apple.com/kb/ht1427

  • I need one XML File containing one Idoc fields Say Orders01

    hiall,
    i need one XML File containing one Idoc fields Say Orders01
    bye
    satish

    hi,
    <?xml version="1.0" encoding="iso-8859-1"?>
    <ORDERS02>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1">
          <TABNAM>EDI_DC40</TABNAM>
          <MANDT>800</MANDT>
          <DOCNUM>0000000000213213</DOCNUM>
          <DOCREL>46B</DOCREL>
          <STATUS>30</STATUS>
          <DOCTYP>ORDERS02</DOCTYP>
          <DIRECT>1</DIRECT>
          <RCVPOR>A000000032</RCVPOR>
          <RCVPRT>LS</RCVPRT>
          <RCVPRN>sell</RCVPRN>
          <RCVSAD/>
          <RCVLAD/>
          <STD/>
          <STDVRS/>
          <STDMES/>
          <MESCOD/>
          <MESFCT/>
          <OUTMOD>4</OUTMOD>
          <TEST/>
          <SNDPOR>SAPSID</SNDPOR>
          <SNDPRT>KU</SNDPRT>
          <SNDPRN>23334</SNDPRN>
          <SNDSAD/>
          <SNDLAD/>
          <REFINT/>
          <REFGRP/>
          <REFMES/>
          <ARCKEY/>
          <CREDAT>20061019</CREDAT>
          <CRETIM>205734</CRETIM>
          <MESTYP>ORDERS</MESTYP>
          <IDOCTYP>ORDERS02</IDOCTYP>
          <CIMTYP/>
          <RCVPFC/>
          <SNDPFC/>
          <SERIAL></SERIAL>
          <EXPRSS/>
        </EDI_DC40>
        <E1EDK01 SEGMENT="1">
          <KZABS>X</KZABS>
          <CURCY>USD</CURCY>
          <WKURS>1.000</WKURS>
          <ZTERM>ZZZZ</ZTERM>
          <BSART>EC</BSART>
          <BELNR>300024455</BELNR>
          <RECIPNT_NO>misssa</RECIPNT_NO>
        </E1EDK01>
        <E1EDK14 SEGMENT="1">
          <QUALF>014</QUALF>
          <ORGID>1000</ORGID>
        </E1EDK14>
        <E1EDK14 SEGMENT="1">
          <QUALF>009</QUALF>
          <ORGID>001</ORGID>
        </E1EDK14>
        <E1EDK14 SEGMENT="1">
          <QUALF>011</QUALF>
          <ORGID>1000</ORGID>
        </E1EDK14>
        <E1EDK03 SEGMENT="1">
          <IDDAT>012</IDDAT>
          <DATUM>20061019</DATUM>
        </E1EDK03>
        <E1EDKA1 SEGMENT="1">
          <PARVW>LF</PARVW>
          <PARTN>000002344</PARTN>
          <TELF1></TELF1>
          <BNAME></BNAME>
        </E1EDKA1>
        <E1EDKA1 SEGMENT="1">
          <PARVW>WE</PARVW>
          <LIFNR>1000</LIFNR>
          <NAME1></NAME1>
          <STRAS></STRAS>
          <ORT01></ORT01>
          <PSTLZ>4444</PSTLZ>
          <LAND1>EN</LAND1>
          <TELF1></TELF1>
          <SPRAS>D</SPRAS>
          <ORT02></ORT02>
          <REGIO>02</REGIO>
        </E1EDKA1>
        <E1EDK02 SEGMENT="1">
          <QUALF>001</QUALF>
          <BELNR>600060324</BELNR>
          <DATUM>20061019</DATUM>
          <UZEIT>205736</UZEIT>
        </E1EDK02>
        <E1EDK17 SEGMENT="1">
          <QUALF>001</QUALF>
          <LKOND>EXW</LKOND>
          <LKTEXT>london</LKTEXT>
        </E1EDK17>
        <E1EDK18 SEGMENT="1">
          <QUALF>001</QUALF>
          <TAGE>12</TAGE>
          <PRZNT>4.000</PRZNT>
        </E1EDK18>
        <E1EDK18 SEGMENT="1">
          <QUALF>002</QUALF>
          <TAGE>30</TAGE>
          <PRZNT>2.000</PRZNT>
        </E1EDK18>
        <E1EDK18 SEGMENT="1">
          <QUALF>003</QUALF>
          <TAGE>45</TAGE>
        </E1EDK18>
        <E1EDP01 SEGMENT="1">
          <POSEX>00010</POSEX>
          <PSTYP>0</PSTYP>
          <KZABS>X</KZABS>
          <MENGE>1.000</MENGE>
          <MENEE>EA</MENEE>
          <BMNG2>1.000</BMNG2>
          <PMENE>EA</PMENE>
          <VPREI>3</VPREI>
          <PEINH>1</PEINH>
          <NETWR>3</NETWR>
          <MATKL>001</MATKL>
          <BPUMN>1</BPUMN>
          <BPUMZ>1</BPUMZ>
          <E1EDP20 SEGMENT="1">
            <WMENG>1.000</WMENG>
            <EDATU>19</EDATU>
          </E1EDP20>
          <E1EDP19 SEGMENT="1">
            <QUALF>002</QUALF>
            <IDTNR>100</IDTNR>
          </E1EDP19>
          <E1EDP19 SEGMENT="1">
            <QUALF>001</QUALF>
            <KTEXT>some text</KTEXT>
          </E1EDP19>
        </E1EDP01>
        <E1EDS01 SEGMENT="1">
          <SUMID>002</SUMID>
          <SUMME>3</SUMME>
          <SUNIT>USD</SUNIT>
        </E1EDS01>
      </IDOC>
    </ORDERS02>
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • XML file containing an ISO-8859-1encoded string not able to see charcater

    We have an XML file with the following encoding:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    The Oracle 10gR2 database is set with the following encoding.
    PARAMETER VALUE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_CHARACTERSET WE8ISO8859P1
    There are some characters that are not displaying within SQL Developer, how do I diagnose this as a database or a client issue?

    Guys, why nobody takes care of at least telling us what characters you cannot see. You describe two random elements of the whole application and expect people to give reasonable answers. Please, read through this forum a bit and you will see how many configuration elements may matter. Then, take some time to describe your problem, including version of software, exact (!) symptoms of the problem, etc. Otherwise, you can just get some guesses instead of a solution!
    -- Sergiusz

  • Reading an xml file as a String

    Hi,
    I have a file to file scenaio in which i have a Outbound data type that has only a single string field named Data.
    I have an xml file as input whose structure is not fixed.
    My input xml file should be read like a blob data through this single field.
    Is this possible in XI?
    AFAIK a xml file will be read only if the outboundDT if of the same structure of the XML.
    Please send in ur suggestions as to how this could be acomplished in XI.

    Hi,
    This can be easily done by using xsl mapping.
    Using this mapping method, all we need to know, would be the root node of the source, after which a xsl:copyof() can be used to copy the entire source payload.
    Regards,
    Smitha.

  • Is there a xml file containing news's author, source etc

    Hi everyone, there are a few corporate news on the front page on the portal, they are html files and saved under root/documents/news/feature news or news achieve.
    When I click it the news page can be displayed in a browser window. When I move the mouse cursor on a file's name the tooltip displays the file's id like f000316a-e2ef-2810-96b4-96263a44e6e1.xml.
    Now I need a xml containing information like news author’s name, source, language, created date, modify person name etc for all the news files.
    If such data is organized in xml file where can I find out?  If such data is saved in database how I can retrieve them?
    Your early reply will be appreciated.
    Best regards.
    Wang

    Hi Wang,
    The question about retrieving this information implies the purpose, how you're going to use these date. Before anybody could help on this you'd have to clarify this more I guess.
    Anyway, I recommend to see this if you haven't check before:
    a) <a href="http://help.sap.com/saphelp_nw70/helpdata/en/f4/9d1f39a27d0e4f8a69c891dc4a4a05/frameset.htm">Properties of XML Documents</a>
    b) <a href="http://help.sap.com/saphelp_nw70/helpdata/en/1a/9a4a3b80f2ec40aa7456bc87a94259/frameset.htm">Predefined Properties</a>
    c) <a href="http://help.sap.com/saphelp_nw70/helpdata/en/67/8882410349213ce10000000a1550b0/frameset.htm">Export and Import of Properties and Metadata</a> - Maybe this is what you're looking for.
    Regards, Peter

  • How to parse xml file, containing image,  generaged from JAX-RS connector?

    Hi,
    We are using JAX-RS connector and just want to call getBusinessObjects() directly using JerseyMe (basically bypassing sync engine). We have used sync engine so far and want to try as how to bypass it. The method produces the text/xml and verified the xml file in the web by giving the full url. The plan is to call the same URL from the Java Me Client using JerseyMe. When I print the bytes at the client I receive the same xml that I have seen in the web. Actually, I am passing an image that I can see in a different character format in xml (assuming this is bcos of UTF-8 encoding). I am wondering as how to parse this xml file and how to decode the "UTF-8" format? Do we need to use SGMP for this or use kxml or java me webservices spec.
    I would really appreciate if somebody can answer this one.
    I have been observing in this forum that SGMP team is not at all active in answering the questions. Please let us know whether Oracle is keeping this product and we can continue using SGMP1.1. Please let us know so that we can plan accordingly as we are building a product based on SGMP.

    Hi Rajiv,
    The client library is using org.apache.commons.codec.binary.Base64 internally. We don't have the full Commons Codec library bundled, but you can look up the javadoc for the Base64 class online. All you need to do is call Base64.decode(obj.getBytes()) on the objects you get out of the XML.
    In general it isn't a good idea to depend on implementation details of the client library, but in this case, I think it is pretty safe to expect org.apache.commons.codec.binary.Base64 to remain in our library.
    --Ryan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • OUTBOUND XML FILE CONTAINS SPECIAL CHARS AFTER SP08 UPGRADE

    Experts,
    Recently MDM server upgraded to SP08 from SP05.
    In our outbound interface scenario we have 1 hierarchy field. The hierarchy field mapped as complete path(parent to Child)
    ex: 1,Parent > 11,Child > 111,Child > 1111,Child.
    In SP05 XML files are generating correctly & PI also dont have any issues while passing this data to ECC.
    After SP08 Server pack upgrade, xml file generating like  below:
    1??, ??Parent??, ???>?11??, ??Child??, ???>?111??, ??Child??, ???>?1111??, ??Child??, ???
    If open the xml file in non ASCC editor I could able to see these special chars. Due to this ISSUE PI could not processing xml files.
    All XML files are failing& blocking in PI.
    Could you let me know what needs to be done at MDM or PI level.
    Appreciate your inputs.
    Thanks
    Audinarayana

    Hello,
    Please check the Destination preview in the syndicator.
    So an syndication on the local machine, open the XML in an Browser, to see check for the special characters.
    If every things is ok, then just place the file in the outbound ready folder.
    If not then, raise an OSS message with SAP, as this a latest release, error resolution would be best provided by SAP
    Regards,
    Abhishek

  • Convert the IDOC XML file into single string?

    Hello All,
    I have a scenario, where i need to conver the IDOC XML  into single string, to send it to target.
    Please let me know how can we achive this, I dont know java coding.
    Please help me out to write the java code.
    Thanks and Regards,
    Chinna

    Hi Chinna,
    You can do this in two ways -
    1. Java mapping
    https://wiki.sdn.sap.com/wiki/display/XI/JavaMapping-ConverttheInputxmlto+String
    https://wiki.sdn.sap.com/wiki/display/Snippets/JavaMapping-ConverttheInputxmltoString
    2. XSLT mapping
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Regards,
    Sunil Chandra

  • Large XML files containing time based data

    Hi,
    i'm having an extremely large XML files, gegas, it holds some info for displaying graphical representations for users, one of which is the updated view every time instance. i'm stuck with handling this large XML file, obviously i tried using a DOM parser, i got an out of memory exception, i though of using SAX as its event based, but then i'll be stuck going backward through the representation, i need users to go backward and forward representing the graphical representation at different time instances.

    It is gigabytes?
    And this file gets modified by some external application(s), rather than being created one time?
    And you want to keep reprocessing it at the same time other application(s) are modifying it?
    If yes to all of those, then I doubt there is any real solution except to copy it. If you attempt to sync it with the file system then you are either going to be locking it, preventing updates, or you are going to end up with corrupted data and thus ill formed xml.
    If the time data is historical in that a 'user' does something and a new entry is made and you want to report in various ways on that data then parsing it into a database would seem like reasonable solution.

  • How to read xml file containing :  ϵ  ɛ  〈 〈  〉  Ѓ  entitiy

    How to read below mentioned entity values from an XML, using a java program. While I am trying to read the xml it displays all the values as ? on command prompt.
    <?xml version="1.0"?>
    <!DOCTYPE entity SYSTEM "entity.dtd">
    <entity>
         <char>
              <iso>&epsiv;</iso>
              <uni>ɛ</uni>
              <ascii>ɛ</ascii>
         </char>
         <char>
              <iso>&lang;</iso>
              <uni>〈</uni>
              <ascii>〈</ascii>
         </char>
         <char>
              <iso>&rang;</iso>
              <uni>〉</uni>
              <ascii>〉</ascii>
         </char>
    </entity>
    Thanks,
    Ranjan Singh
    Edited by: 975567 on Dec 7, 2012 1:34 AM
    Edited by: 975567 on Dec 7, 2012 1:36 AM
    Edited by: 975567 on Dec 7, 2012 1:37 AM

    it is linking to so many forumsNo it's not. It's Oracles XML DB forum, where XML stuff is discussed
    i want from basics.
    any documentation is thereThat FAQ link provides all the basics required to get XML into your database and parse it. You just have to pick out the parts you require.
    If you want answers specifically for your project then you'll have to buy in a consultant, or do what you can yourself and ask questions about specific issues you are having.

  • Processing XML files that contain Special Characters

    Hello:
    Before I explain my problem I think I should briefly explain what I am trying to do. I have a JSP page that invokes a Java method (the code is attached). This java method takes in an XML file and an XSLT file. It parses the XSLT and also the XML file. If the parsing went through fine, it then processes the XML file and applies the XSLT to the XML file and returns a XMLDocumentFragment Object back to JSP and the JSP renders it.
    This mechanism works well. However off late I have encountered a few XML files containing characters such as &Ecirc (Capital E with circumflex accent). Whenever my Java method tries to parse/process this .xml file it gives me the following error.
    ORG.oclc.da.utilities.ifs.ReportException: An Error Occured While Parsing the Report: Missing entity 'Ecirc'.     at ORG.oclc.da.archive.userinterface.ReportHelper.retrieveReport(Unknown Source)     at /ViewReport.jsp._jspService(/ViewReport.jsp.java:87) (JSP page line 65)     at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    It seems like the Oracle Parser/XSLT Processor (oracle.xml.parser.v2.DOMParser) I am using is not able to handle special characters such &Ecirc. I was wondering if there is anyway around this problem.
    Attached is the Java Method that handles both the parsing and processing of the XML file.
    /** The method parses the Report Data and applies the Style Sheet to this data
    * @param The InputStream (Report Contents - .xml file), Name of the StyleSheet that needs to be applied
    * @return A sub-section of the report data (DOM DocumentFragment is returned)
    private XMLDocumentFragment parseReport(InputStream reportStream,String strStyleSheet) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL urlStyleSheet;
    //Get the URL for the Style Sheet
    urlStyleSheet = new URL(strStyleSheet);
    //Create an instance of the Dom Parser
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //Parse the XSL document and create a DOM Object
    parser.parse(urlStyleSheet);
    xsldoc = parser.getDocument();
    //Parse the report document (a .xml) and create a DOM Object
    parser.parse(reportStream);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, urlStyleSheet);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    // processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xsl, xml);
    return result;
    If you have any suggestions please let me know. If you need more information I will be to furnish it.
    thanks
    Mathangi

    Hello,
    I just had the same problem, you need to include the approprate entity sets so that the xsl parser will recognize them (and you won't
    get the "missing entity" error:
    if you already haven't you need to add a DOCTYPE processing instruction for your dtd, to the top of your xml files to be parsed, for ex.:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "file:///mydir/mydtd.dtd">
    then in "mydtd.dtd", add references to these 3 entity sets (if you have a dtd - if not then create one just with these entries):
    <!ENTITY % HTMLlat1 PUBLIC
    "-//W3C//ENTITIES Latin 1 for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
    %HTMLlat1;
    <!ENTITY % HTMLspecial PUBLIC
    "-//W3C//ENTITIES Special for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
    %HTMLspecial;
    <!ENTITY % HTMLsymbol PUBLIC
    "-//W3C//ENTITIES Symbols for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
    %HTMLsymbol;
    Or, grab the ".ent" files from the www.w3.org site and put them on your server in the dtd dir, and change the "http:... reference, to
    "file:...", it will be faster to parse (that's what I did). FYI, "Ecirc" is in xhtml-lat1.ent.
    Also, after I did this,I developed another problem where my xsl parser and xmlmarkup tag-converting function converts certain
    html entities to their octal counterparts, and I don't want this and don't know how to stop it (I have a posting out for this also).
    Additionally, thanks for posting your parseReport method, it just so happens that I was looking for a way to do something like that,
    it should be helpful to me.
    -JK
    Hello:
    Before I explain my problem I think I should briefly explain what I am trying to do. I have a JSP page that invokes a Java method (the code is attached). This java method takes in an XML file and an XSLT file. It parses the XSLT and also the XML file. If the parsing went through fine, it then processes the XML file and applies the XSLT to the XML file and returns a XMLDocumentFragment Object back to JSP and the JSP renders it.
    This mechanism works well. However off late I have encountered a few XML files containing characters such as J (Capital E with circumflex accent). Whenever my Java method tries to parse/process this .xml file it gives me the following error.
    ORG.oclc.da.utilities.ifs.ReportException: An Error Occured While Parsing the Report: Missing entity 'Ecirc'.     at ORG.oclc.da.archive.userinterface.ReportHelper.retrieveReport(Unknown Source)     at /ViewReport.jsp._jspService(/ViewReport.jsp.java:87) (JSP page line 65)     at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)     at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    It seems like the Oracle Parser/XSLT Processor (oracle.xml.parser.v2.DOMParser) I am using is not able to handle special characters such J. I was wondering if there is anyway around this problem.
    Attached is the Java Method that handles both the parsing and processing of the XML file.
    /** The method parses the Report Data and applies the Style Sheet to this data
    * @param The InputStream (Report Contents - .xml file), Name of the StyleSheet that needs to be applied
    * @return A sub-section of the report data (DOM DocumentFragment is returned)
    private XMLDocumentFragment parseReport(InputStream reportStream,String strStyleSheet) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL urlStyleSheet;
    //Get the URL for the Style Sheet
    urlStyleSheet = new URL(strStyleSheet);
    //Create an instance of the Dom Parser
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //Parse the XSL document and create a DOM Object
    parser.parse(urlStyleSheet);
    xsldoc = parser.getDocument();
    //Parse the report document (a .xml) and create a DOM Object
    parser.parse(reportStream);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xsl = new XSLStylesheet(xsldoc, urlStyleSheet);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    // processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xsl, xml);
    return result;
    If you have any suggestions please let me know. If you need more information I will be to furnish it.
    thanks
    Mathangi

  • Find file by file name containing a string?

    Hi Guys,
    I'm trying to write a function that looks for a txt file containing a string in it's name. 
    $scriptLoc = [string](Get-Location)
    $files = Get-ChildItem - Path $scriptLoc -filter *Yellow
    So I have a list of files. 
    Yellow_Config.txt
    Blue_Config.txt
    Red_Config.txt
    What I want to do is only retrieve the .txt that contains the name Yellow. When I run my code nothing happens.

    You've got your wildcard in the wrong place in your filter:
    $files = Get-ChildItem - Path $scriptLoc -filter Yellow*
    See:
    Get-Help about_Wildcards
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • JDOM parser fails to parse Huge Size Xml Files ??? Unable to Parse ???

    Hi All,
    When i transformed or parsed many XML Files of huge size...I am getting java.lang.OutOfMemory error for all the huge xml files. It is working fine for files which is of small size.
    I've 2GB ram in my system. I have also set heapsize for the JVM.
    -Xms512M -Xmx1800M (or) -Xms512M -Xmx1500M
    I like to know what are the drawbacks of JDOM parser ?
    What is the maximum size of the Xml which JDOM can parse ?
    I've read a long time before that parsers have certain limitations. Can anybody tell me the limitations of the parses?
    Please help. i'm currently using jdom.jar to parse the xml files.
    Thanks,
    J.Kathir

    Hi All,
    When i transformed or parsed many XML Files of huge
    size...I am getting java.lang.OutOfMemory error for
    all the huge xml files. It is working fine for files
    which is of small size.Of course it is.
    >
    I've 2GB ram in my system. I have also set heapsize for the JVM.
    -Xms512M -Xmx1800M (or) -Xms512M -Xmx1500MYou can't always get what you want. Your JVM is competing with all the other processes on your machine, including the OS, for RAM.
    I like to know what are the drawbacks of JDOM parser ?You just discovered it: all DOM parsers create an in-memory representation of the entire document. A SAX parser does not.
    What is the maximum size of the Xml which JDOM can parse ?The max amount of memory that you have available to you.
    I've read a long time before that parsers have
    certain limitations. Can anybody tell me the
    limitations of the parses?See above.
    Please help. i'm currently using jdom.jar to parse the xml files.You can try a SAX parser or a streaming parser. Maybe those can help.
    %

Maybe you are looking for

  • Alv report in tree format

    hi experts i have a report which displays out put in alv grid display with 17 fields. my requirement is i have to change the alvgrid display output into ALV Tree with    9 levels with fields and their descriptions. i should mantain back option in alv

  • Separate Apple Hardware Test DVD for MacBook Pro original??

    Hey Folks, I'm trying to verify whether or not the MacBook Pro came with the Apple Hardware Test as a separate DVD disk. The "MacBook Pro" Install disk references it but I can't seem to find the software on that DVD. Any guesses out there would be ap

  • Java heap error

    Hi All I have developed a Matrix report recently and it is throwing error when it was loaded and ran locally and also after registerd in the Apps.The error is "Java Heap Error".Correct me if i am wrong to my knowledge what i am thinking is it is gett

  • No need to calc the tax by using BAPI_ACC_DOCUMENT_POST

    Hi i am using BAPI_ACC_DOCUMENT_POST to upload the transaction data. here no need to calc the TAX since i have the tax field in my file. i checked the SDN links but those are not serving  problem. Pls give some snippet to slove my problem. Thanks in

  • How to limit text in a cell

    I have a spreadsheet that a column can only contains 30 characters, how can I easily make numbers either identify those over 30 characters or chop off the extra ones?