Parse XML fail

I want to parse following xml file
<?xml version="1.0" encoding="UTF-8" ?>
<table count='2'>
   <row>
      <id>
         <![CDATA[1]]>
      </id>
      <type>
         <![CDATA[income]]>
      </type>
     <money>
         <![CDATA[234]]>
     </money>     
     <as_sortIndex>1</as_sortIndex>
   </row>
   <row>
      <id>
          <![CDATA[2]]>
      </id>
      <type>
         <![CDATA[outcome]]>
      </type>
      <money>
         <![CDATA[108]]>
      </money>     
      <as_sortIndex>2</as_sortIndex>
   </row>
</table>Parse code is follows,when I run it,I find I can't print xml value,where is wrong? Thanks
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="javax.xml.parsers.*"%>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.dom.*"%>
<%@ page import="javax.xml.transform.stream.*"%>
<%@ page import="org.w3c.dom.*"%>
<%@ page import="java.io.*"%>
<%
     DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
     DocumentBuilder parser=factory.newDocumentBuilder();
     Document doc=parser.parse(application.getRealPath("/")+new File("test.xml"));
     NodeList nlist=doc.getElementsByTagName("table");
     Element node=(Element)nlist.item(0);
     String v=node.getElementsByTagName("row").item(0).getFirstChild().getNodeValue();
     System.out.println("=="+v);
%>

I think u should first change the CDATA NODES of xml to TEXT Nodes. Then you try to parse this.
try the following code to change the CDATA nodes to TEXT nodes.
==================================================
public static void main(String[] args) throws Exception {      
getinputFile(youXMLfile); // "yourXMLfile" is the file object of the input xml file with CDATA nodes
public void getinputFile(File f) throws Exception{
          File inputfile = new File("inputXMlFile.xml");
          DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
dbfactory.setCoalescing(true);
DocumentBuilder db = dbfactory.newDocumentBuilder();
Document doc = db.parse(inputfile);
new ConvertingCDATANodesTextNodes().CDATAtextnode(doc);
public void CDATAtextnode(Document doc) throws Exception {
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
DOMSource source = new DOMSource(doc);
transformer.transform(source, result);
String xmlfile = sw.toString();
System.out.println("xml file = "+xmlfile);
==================================================
Hope it will solve your problem

Similar Messages

  • LO Error 26005 Failed to parse XML

    Good Afternoon,
    I currently have an Xcelsius document that is attached to a Crystal Report that is in Infoview.  I have it connected by using Live Office.  The Crystal report basically contains a cross tab of data and is run nightly in our system.  I bring back the data into Excel in order to build an Xcelsius document off of it.  I havent' been using the Live Office piece all that much until recently therefore please excuse my ignorance.  I setup my data connection as a Live Office connection.  My server connection seems to be correct:
    http://WHGCRYSTAL3:8080/dswsbobje/services/session
    However, when I try to refresh the document, I get the following error:
    soapenv:Server.generalException: Failed to parse XML. (LO 26005)
    Any ideas as to what this could be?  I have Crystal Xcelsius Enterprise 2008.  The version is 5.0.0.99 and the build number is 12,0,0,121.  I think I am all updated on service packs but I could  be wrong.  Any help is appreciated.

    I downloaded all of the service packs and fixes and now I am up to date.  I am still getting the error with an additional error.   This is what is says:
    Failed to parse XML. (LO 26005) (LO 26000)
    Any other ideas as to why this is happening?

  • Weblogic 10.0 Parsing Failure in config.xml: failed to load java type

    Hello,
    I've just installed a Weblogic 10.0 on a Linux server and when i try to start it, by :
    bash$ : sudo -u weblogic ./startWebLogic.sh
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=128m
    WLS Start Mode=Production
    CLASSPATH=:/opt/weblogic/10.0/patch_wls1002/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/10.0/patch_cie640/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/10.0/jdk150_15/lib/tools.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic_sp.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic.jar:/opt/weblogic/10.0/modules/features/weblogic.server.modules_10.0.2.0.jar:/opt/weblogic/10.0/modules/features/com.bea.cie.common-plugin.launch_2.1.2.0.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/webservices.jar:/opt/weblogic/10.0/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/opt/weblogic/10.0/modules/net.sf.antcontrib_1.0b2.0/lib/ant-contrib.jar::/opt/weblogic/10.0/weblogic10.0/common/eval/pointbase/lib/pbclient51.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/xqrl.jar::
    PATH=/opt/weblogic/10.0/weblogic10.0/server/bin:/opt/weblogic/10.0/modules/org.apache.ant_1.6.5/bin:/opt/weblogic/10.0/jdk150_15/jre/bin:/opt/weblogic/10.0/jdk150_15/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http://hostname:port/console *
    starting weblogic with Java version:
    java version "1.5.0_15"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
    Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
    Starting WLS with line:
    /opt/weblogic/10.0/jdk150_15/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=128m -da -Dplatform.home=/opt/weblogic/10.0/weblogic10.0 -Dwls.home=/opt/weblogic/10.0/weblogic10.0/server -Dweblogic.home=/opt/weblogic/10.0/weblogic10.0/server -Dwli.home= -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/opt/weblogic/10.0/patch_wls1002/profiles/default/sysext_manifest_classpath:/opt/weblogic/10.0/patch_cie640/profiles/default/sysext_manifest_classpath -Dweblogic.security.providers.authentication.LDAPDelegatePoolSize=50 -Dweblogic.management.username=system -Dweblogic.management.password=admin9424 -Dweblogic.Name=AdminServer -Djava.security.policy=/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic.policy weblogic.Server
    <Jun 7, 2010 9:49:12 AM CEST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    /opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n-schemas.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n_common.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n_system.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/wlp_services.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_common.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_schemas.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_system.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/wsrp-client.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/wsrp-common.jar>
    <Jun 7, 2010 9:49:13 AM CEST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Server VM Version 1.5.0_15-b04 from Sun Microsystems Inc.>
    <Jun 7, 2010 9:49:13 AM CEST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.0 MP2 Sat Apr 25 01:45:38 EDT 2009 1213942 >
    i got the following error messages :
    *<Jun 7, 2010 9:49:14 AM CEST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141266]Parsing Failure in config.xml: failed to load java type corresponding to e=domain@http://www.bea.com/ns/weblogic/920/domain>*
    <Jun 7, 2010 9:49:14 AM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
    <Jun 7, 2010 9:49:14 AM CEST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
    <Jun 7, 2010 9:49:14 AM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    If i start the server as root, it boots but i cant deploy anything.
    Any idea about this behavior ?

    Hi,
    It is the problem in prasing the DTD of config.xml file
    It look like this
    <?xml version='1.0' encoding='UTF-8'?>
    <domain xmlns="http://www.bea.com/ns/weblogic/920/domain" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90/security/xacml http://www.bea.com/
    ns/weblogic/90/security/xacml.xsd http://www.bea.com/ns/weblogic/90/security http://www.bea.com/ns/weblogic/90/security.xsd http://www.bea.com/ns/weblogic/92
    0/domain http://www.bea.com/ns/weblogic/920/domain.xsd http://www.bea.com/ns/weblogic/90/security/wls http://www.bea.com/ns/weblogic/90/security/wls.xsd">
    Please change your DTD to this lines and start the server.
    Regards
    Ravi D

  • Failed to parse XML. (LO 26005) (LO 26000)

    Hi experts,
    I'm facing a problem with SAP Business Objects Dashboards. I have a document with a Liveoffice connection and when I try to preview my dashboard, I get an error - Failed to parse XML. (LO26005) (LO 26000)
    I've made some research and it seems that the LiveOffice version is different from the Business Objects Web Service.
    I've checked the version of LiveOffice, Dashboards and Web Service and they all seem to be the same:
    LiveOffice:
    Dashboards:
    LaunchPad:
    What am I missing here?
    Thanks

    Hi Amit, thanks for the quick answer.
    The Live Office service is Active.
    When I export the Excel file
    , and then open it, it seems to lose the live office object.
    But if I try to refresh the objects in Excel sheet within the Dashboard, it refreshes with no problem.
    Am I missing something?

  • Flash builder 4.6 : aapt tool failed - AndroidManifest.xml:33: error: Error parsing XML: not well-fo

    This is happening with a "fresh" installation of flash builder 4.6 and it's driving me crazy:  During "export release build" I get the error: "Error occurred while packaging the application: aapt tool failed: c:\users\alfonso\AppData\local\Temp[...]\AndroidManifest.xml:33: error: Error parsing XML: not well-formet (invalid token)  This happened while importing a project build into another computer.  If I create a BLANK air mobile project and I copy the application manifest on the old application EV ERYTHING WORKS FINE. As soon as I touch a single line of code in the application manifest I get the error. And also I get the error even if I UNDO the changes into the -app.xml  Any help would be really appreciated  Thanks  Alfonso Florio

    Having same issue here. In my case I'm just trying to place a local video file; hear audio, t see no video running it within Flash Builder and the ADL simulator on my Mac. It's very frustrating that everything Abobe has posted on this is targeted toward the Flash player runnung inside a damn browser... don't they realize we need a IOS solution for the 1000s of iPhones and iPads out there? Very frustrated with this.

  • How to Parse XML into String in BPEL?

    Hi,
    Can anyone tell me, how can I parse XML into String?
    I am taking input from File Adapter, File adapter is reading that XML.
    Then in assign activity i am using XPath expression(built functions) using XMLParser(),doTranslateToNative() etc.. many functions I have tried but XML is not getting parsed into String Variable.
    Please help me asap.
    Thanks
    Shikha

    Thanks a lot Eric.
    I am trying this, oraext:get-content-as-string('receiveInput_Read_InputVariable','body','/ns3:orders')
    but getting this error
    <bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:get-content-as-string('receiveInput_Read_InputVariable','body','/ns3:orders'). The XPath expression failed to execute; the reason was: internal xpath error. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>

  • Parsing xml in clob field remove non utf-8 characters

    hi all,
    i have an issue where a stored procedure runs during a nightly process and parses xml contained in a clob field. There are some records that contain non-utf8(they paste characters from word)characters and therefore the parse fails when using performing an xquery select against the clob field as xmltype. I was wondering if anyone knew of a handy way to handle such a situation? I have looked around a bit and not found anything that seemed tailored to my situation, and I would like something a bit more generic than doing a replace on individual characters that i have found causing issues...thx in advance! -- jp

    Hi,
    Like BluShadow I'm curious to see a test case...
    Depending on the way it's been created, the encoding declared in the XML prolog doesn't necessarily reflects the actual encoding of the content.
    What's your database character set, and version?
    Please also post the error message you get (LPX-00200 probably?).

  • Setting Third-Party Saxon parser for parsing xml files

    Hi,
              I wish to parse certain xhtml files using saxon parser because that serves our needs. In order to that in tomcat, I used to use the following code -
              System.getProperties().setProperty("javax.xml.parsers.SAXParserFactory","com.icl.saxon.aelfred.SAXParserFactoryImpl");
              System.getProperties().setProperty("javax.xml.transform.TransformerFactory","com.icl.saxon.TransformerFactoryImpl");
              However this does not work in Weblogic 8.1 SP5. Which means, it actually ignores the settings and uses the default parser (which fails to parse the documents).
              I noticed that in weblogic I need to include these in the weblogic-application.xml located under the application/META-INF folder. I update the file with the following -
              <xml>
              <parser-factory>
              <saxparser-factory>com.icl.saxon.aelfred.SAXParserFactoryImpl</saxparser-factory>
              <transformer-factory>com.icl.saxon.TransformerFactoryImpl</transformer-factory>
              </parser-factory>
              </xml>
              Everything was fine and the documents were parsed but for every server start up, I got an error message -
              <Apr 4, 2006 10:34:43 AM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "HarvesterWeb".
              javax.servlet.UnavailableException: Parsing error processing resource path
              at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.initModuleConfig
              (AutoRegisterActionServlet.java:416)
              at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
              at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:103)
              at javax.servlet.GenericServlet.init(GenericServlet.java:258)
              at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:109)
              at com.bea.wlw.netui.pageflow.PageFlowActionServlet.init(PageFlowActionServlet.java:107)
              at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1094)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
              at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:970)
              at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:949)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:888)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3430)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3375)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3356)
              at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:6208)
              at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:864)
              at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2134)
              at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2175)
              at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2122)
              at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3099)
              at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1768)
              at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:351)
              at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
              at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:136)
              at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:965)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:360)
              at weblogic.Server.main(Server.java:32)
              >
              And the server needs to be restarted after every couple of hits(particularly failures).
              Also, my other applications won't deploy throwing the same stack trace.
              At the end of all this, I get this message - Not sure if they are related but
              log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
              log4j:WARN Please initialize the log4j system properly.
              Any ideas or anyone run into these kind of situations? Moderators, can you please help?

    Try the following.
              1. Keep the 3rd party jars in your WLS classpath and not within your ear.
              2. Create an XML Registry through admin console.
              Services->XML.
              3. Enter appropriate values for the following
              Document Builder Factory:
              SAX Parser Factory:
              Transformer Factory:
              4. Restart WLS.
              Refer to this link. http://e-docs.bea.com/wls/docs81/ConsoleHelp/domain_xmlregistrytable.html
              cheers,
              Dips

  • Difficulty continuing past exception in a for loop while parsing XML

    Hola -
    I've got an issue where (in this case) Turkish characters cause XML parsing to fail; I'm trying to insert an exception here so that any given XML element which causes a problem will simply be skipped & I can figure out the issue later. But if I place it outside, as presented below, then the entire file does not get written rather than simply that element being skipped. My other attempts have resulted in compiler errors indicating I've misplaced it, such as:
    Error(61,6): PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following: begin case declare end exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
    Can I get this to drop processing of only the specific problem element & return to complete the entire file?
    Many thanks for any help here, greatly puzzled by this.
    create or replace
    PROCEDURE "RSSLOOPWORKS2" ( fund_in IN VARCHAR2)
    is
    -- customizable parameters
    l_title varchar2(255) := ' New Titles Since ' || to_char(sysdate - 90, 'MM/DD/YYYY');
    l_link varchar2(255) := 'replace' || fund_in || '.rss';
    l_description varchar2(255) := 'This is a feed of changes to items ' || fund_in;
    l_language varchar2(255) := 'en-us';
    -- end customizable parameters
    l_version varchar2(10) := '2.0';
    l_clob clob;
    l_idx pls_integer := 1;
    l_len pls_integer := 255;
    l_defrows pls_integer := 100;
    l_maxrows pls_integer := 100;
    l_desclen pls_integer := 250;
    -- for output to file
    begin
    -- fund := fund_in;
    for i in (
    select xmlelement( "rss",
    -- Begin XML Header Block
    xmlattributes( l_version as "version"),
    xmlelement( "channel",
    xmlforest( l_title as "title",
    l_link as "link",
    l_description as "description",
    l_language as "language"),
    -- End XML Header Block
    -- Begin List of Individual Articles or Items
    xmlagg(
    xmlelement( "item",
    CASE
    WHEN x.title IS NOT NULL THEN xmlelement("title", x.title)
    ELSE xmlelement("title", substr(x.description,1,255))
    END,
    xmlelement("link", x.link),
    xmlelement("description", x.description || ' -- Call number: ' || x.callnum),
    xmlelement("callnum", x.callnum),
    xmlelement("pubDate", to_char(x.updated_on,'Dy, DD Mon RRRR hh24:mi:ss') || ' EST'),
    xmlelement("guid", XMLATTRIBUTES('false' as "isPermaLink"),x.id||to_char(x.updated_on,'JHH24MISS'))
    -- End List of Individual Articles or Items
    ) as result
    from ( -- Actual Database Query that populates the list of Items
    select id,title,link,description,updated_on, callnum
    from drx_rss_feeds
    where (fund like fund_in||'%')
    and rownum < (l_maxrows+1)) x)
    loop
    l_clob := xmltype.extract(i.result,'/').getclobval;
    exit;
    end loop; --i
    --- EXCEPTION
    exception
    WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(dbms_utility.format_error_backtrace);
    --- OUTPUT RESULTS
    -- for i in 1..ceil(dbms_lob.getlength(l_clob)/l_len) loop
    dbms_xslprocessor.clob2file(l_clob, '/iiidb/http/live/screens/rss/', fund_in || '.rss');
    -- l_idx := l_idx + l_len;
    -- end loop; --i
    end rssloopworks2;

    To clarify, I know the practice should be to separate out statements so that the next statement can execute; however, inside of the loop, I haven't been able to correctly accomplish this. When I try to add a block inside the loop over 'result' then the procedure compiles & runs, but I haven't gotten an error and there is not output.
    create or replace
    PROCEDURE "RSSLOOPWORKS2" ( fund_in IN VARCHAR2)
    is
    -- customizable parameters
    l_title varchar2(255) := ' New Titles Since ' || to_char(sysdate - 90, 'MM/DD/YYYY');
    l_link varchar2(255) := 'replace' || fund_in || '.rss';
    l_description varchar2(255) := 'This is a feed of changes to items ' || fund_in;
    l_language varchar2(255) := 'en-us';
    -- end customizable parameters
    l_version varchar2(10) := '2.0';
    l_clob clob;
    l_idx pls_integer := 1;
    l_len pls_integer := 255;
    l_defrows pls_integer := 100;
    l_maxrows pls_integer := 100;
    l_desclen pls_integer := 250;
    -- for output to file
    begin
    -- fund := fund_in;
    for i in (
    select xmlelement( "rss",
    -- Begin XML Header Block
    xmlattributes( l_version as "version"),
    xmlelement( "channel",
    xmlforest( l_title as "title",
    l_link as "link",
    l_description as "description",
    l_language as "language"),
    -- End XML Header Block
    -- Begin List of Individual Articles or Items
    xmlagg(
    xmlelement( "item",
    CASE
    WHEN x.title IS NOT NULL THEN xmlelement("title", x.title)
    ELSE xmlelement("title", substr(x.description,1,255))
    END,
    xmlelement("link", x.link),
    xmlelement("description", x.description || ' -- Call number: ' || x.callnum),
    xmlelement("callnum", x.callnum),
    xmlelement("pubDate", to_char(x.updated_on,'Dy, DD Mon RRRR hh24:mi:ss') || ' EST'),
    xmlelement("guid", XMLATTRIBUTES('false' as "isPermaLink"),x.id||to_char(x.updated_on,'JHH24MISS'))
    -- End List of Individual Articles or Items
    ) as result
    from ( -- Actual Database Query that populates the list of Items
    select id,title,link,description,updated_on, callnum
    from drx_rss_feeds
    where (fund like fund_in||'%')
    and rownum < (l_maxrows+1)) x)
    loop
    BEGIN
    l_clob := xmltype.extract(i.result,'/').getclobval;
    exit;
    exception
    WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('oi');
    END;
    end loop; --i
    --- EXCEPTION
    exception
    WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(dbms_utility.format_error_backtrace);
    --- OUTPUT RESULTS
    -- for i in 1..ceil(dbms_lob.getlength(l_clob)/l_len) loop
    dbms_xslprocessor.clob2file(l_clob, '/iiidb/http/live/screens/rss/', fund_in || '.rss');
    -- l_idx := l_idx + l_len;
    -- end loop; --i
    end rssloopworks2;

  • OSB download 250 MG file results in error Error parsing XML: {err}FORG0005

    Hi,
    Using OSB 11.1.1.5. I have service to download files from Oracle ECM. Running into an issue where the file size is over 250 MB service is failing. Giving me an error
    OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    I have service callout to get the binary content of the file and it's taking over 5 minutes and then this error. I also set Read Timeout and Connection Timeout to 20 seconds at the business service level
    but looks like it's not taking that timeout values and still waiting over 5 minutes before it dies. My JTA Timeout is set to 12 minutes. After service callout I have a log to write the output but it's not even getting there and throwing that error above
    How can I trap that kind of errors. How can I set timeout at service level i.e. if after 1 minute if the file is still downloading close the connection etc.
    I don't want to have some many open threads in the back ground as this service is being called in a loop to download files. Smaller files like 30 MG downloads fine but the larger ones are not.
    I have a error hndler at the root level but the error is not trapped there either. Looks like system errors are not getting trapped.
    So Just wondering if OSB is suitable to download that huge files.
    Thanks

    The reason for the error is the xquery is not able to find the values in the input... Check the input and namespaces...
    Try...
    <ns1:value1>{ data($addition1/ns0:value1) }</ns1:value1>
    <ns1:value2>{ data($addition1/ns0:value2) }</ns1:value2>Cheers,
    Vlad

  • OSB transformation error- BEA-382513- Error parsing XML

    Hi Gurus -
    I am struggling to fix one OSB Xquery transformation error
    <con:errorCode>BEA-382513</con:errorCode>
    <con:reason>OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    I am passing SIL formatted data to this transformation an expecting a transformation but its keep on failing, I have tested the transformation and thats looking good.
    This is my replace operation where I am doing transformation.
    Replace [ node contents ] of [ ./* ]
    in [ body ] with
    XQuery Resource: TestProject/Common/Transformation/XQJMS2DBTransformation
    Variable Names And Bindings:
    commonInterfaceLayout1 - $body/*:CommonInterfaceLayout
    transformation file
    (:: pragma bea:global-element-parameter parameter="$commonInterfaceLayout1" element="ns0:CommonInterfaceLayout" location="../../Common/Schema/CommonInterfaceLayout.xsd" ::)
    (:: pragma bea:global-element-return element="ns1:EaiAuditCollection" location="../../Common/Schema/XSD_InsertEAIAuditDBTable.xsd" ::)
    declare namespace ns1 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertEAIAuditDBTable";
    declare namespace ns0 = "http://eai.fpl.com/schema/CommonInterfaceLayout";
    declare namespace xf = "http://tempuri.org/ErrorHandlingR1V1/XQJMS2DB/";
    declare function xf:XQJMS2DB($commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout))
    as element(ns1:EaiAuditCollection) {
    <ns1:EaiAuditCollection>
    <ns1:EaiAudit>
    <ns1:eaiAuditId></ns1:eaiAuditId>
    <ns1:messageId>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageId) }</ns1:messageId>
    <ns1:messageDate>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageReceivedDate) }</ns1:messageDate>
    <ns1:messageType>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageType) }</ns1:messageType>
    <ns1:messageSource>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageSource) }</ns1:messageSource>
    <ns1:messageTarget>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageTarget) }</ns1:messageTarget>
    <ns1:appUniqId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ApplicationUniqueId) }</ns1:appUniqId>
    <ns1:payload>{ data($commonInterfaceLayout1/ns0:Body) }</ns1:payload>
    <ns1:componentName>{ data($commonInterfaceLayout1/ns0:Header/ns0:ComponentName) }</ns1:componentName>
    <ns1:clientId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ClientId) }</ns1:clientId>
    <ns1:createDate>{ fn:current-date() }</ns1:createDate>
    <ns1:processFlag></ns1:processFlag>
    </ns1:EaiAudit>
    </ns1:EaiAuditCollection>
    declare variable $commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout) external;
    xf:XQJMS2DB($commonInterfaceLayout1)
    pls advice whats wrong I am doing here.
    Edited by: KumarB on Feb 7, 2013 9:56 PM

    update - I dont see this error any more but transformation is not happening. as a result of transformation, i get same message as output .. no change in it.

  • Does JMS parse xml content in TextMessages

              Hi
              I am working on WLS 6.1sp2 and I am using jms TextMessage type of message to
              send XML messages from one subsystem to another. I have added an XML registry
              for my version of XML parser. Now I do not have any entries for the entity declarations
              nor for the parser entries in the registry.
              When I send in an XML message in a TextMessage envelope I find the following
              errors in the log.
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
              ment.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve SYSTEM id. The root element is required in a well-formed docu
              ment.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve root tag. The root element is required in a well-formed docum
              ent.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory class
              specified in the Server console. Invalid parameters: at least one of publicId,
              s
              ystemId, rootTag must be non-null>
              [ChangeAwareClassLoader] : Name is : META-INF/services/org.apache.xerces.xni.par
              ser.XMLParserConfiguration
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
              ment.>
              Now from the logs I understand that the message is being parsed and since the
              parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since I am
              using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also this
              is not logged by any component of my subsystems, this is a weblogic XML Service
              log and when I trace through the code I find that it comes up after the first
              subsystem sends the message and before the second subsystem receives it.
              The question then is does JMS parse XML content in TextMessages and if so how
              can I disable that parsing?
              Thanks
              Sandeep
              

    JMS does not automatically parse TextMessages. Check the XML declaration in
              your application's deployment descriptors. That's often the source of this
              error.
              FYI, you can use XMLMessage for xml payloads. As far as I can remember, the
              XMLMessage is an extension of the TextMessage with xml parsing built in.
              Adarsh
              "Sandeep Nayak" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi
              >
              > I am working on WLS 6.1sp2 and I am using jms TextMessage type of message
              to
              > send XML messages from one subsystem to another. I have added an XML
              registry
              > for my version of XML parser. Now I do not have any entries for the entity
              declarations
              > nor for the parser entries in the registry.
              >
              > When I send in an XML message in a TextMessage envelope I find the
              following
              > errors in the log.
              >
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve PUBLIC id. The root element is required in a
              well-formed docu
              > ment.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve SYSTEM id. The root element is required in a
              well-formed docu
              > ment.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve root tag. The root element is required in a well-formed
              docum
              > ent.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory
              class
              > specified in the Server console. Invalid parameters: at least one of
              publicId,
              > s
              > ystemId, rootTag must be non-null>
              > [ChangeAwareClassLoader] : Name is :
              META-INF/services/org.apache.xerces.xni.par
              > ser.XMLParserConfiguration
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve PUBLIC id. The root element is required in a
              well-formed docu
              > ment.>
              >
              > Now from the logs I understand that the message is being parsed and since
              the
              > parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since
              I am
              > using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also
              this
              > is not logged by any component of my subsystems, this is a weblogic XML
              Service
              > log and when I trace through the code I find that it comes up after the
              first
              > subsystem sends the message and before the second subsystem receives it.
              >
              > The question then is does JMS parse XML content in TextMessages and if so
              how
              > can I disable that parsing?
              >
              > Thanks
              >
              > Sandeep
              

  • Parse xml containing ? symbol in fields

    Hi! my problem is that I try to parse xml files with jdom 6 and some fields may contain question marks, if this happens my java program fails.
    I solved the problem of parsing odd characters (like inverted question mark, spanish symbols...) but it is not solved for ? symbol, maybe it is used as tokenizer in jdom? can anybody help me?
    Thank u in advance

    The xml code is
    <ShortDescription>�Cansado de esperar? Tenemos tu soluci�n...</ShortDescription>
    but I couldn�t get the exception message. I�m sure it is the ? character cos I removed it and it works good even when the text contain spanish characters as in the example.
    Thank u very much

  • Urgent : Generation of file "application".xml fails and deploys aborted

    Hi,
    I recently took over an application (called RDAS) and downloaded if from DTR. But this didnt work well (all sources files have been downloaded, but lots of models and custom controllers were missing in the webdynpro perspective). This has been fixed well by modifying manually file Rdas.wdcomponent
    I just found out that in my component, a window and it's view are also missing (no links with any other windows or views of my application). This window just contains a view and acts as a popup (no navigation link or so with the rest of my component). I modified files Rdas.wdcomponent and RdasInterface.wdcomponentinterface and it builds well. No errors. I can now find my missing window and view in the webdynpro perspective.
    But since then I can not deploy anymore. I get the following errors:
    Web Dynpro Generation: com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to parse XML document containing VMO=com.alstom.power.rdas.wd.Rdas., D:/Workspace_JDI/0/DCs/power.alstom.com/rdaswd/_comp/gen_wdp/configuration/Applications/com.alstom.power.rdas.wd.Rdas/Rdas.xml
    And when I check in the generated files, the xml file associated to the application is not genetared anymore.
    Any ideas?
    Points rewarded for any help
    Thanks
    Yann

    Hi,
    Finally I figured out what was wrong.
    An entry was missing in file RDAS.wdcomponent (views have to be inserted in the views list and also in the components list).
    Do I deserve points?
    I think so

  • Validate xml fails using XInclude.

    I tried to use the XInclude syntax in a very simple way in order to make my xml more modular.
    Here the example :
    <?xml version='1.0' encoding='windows-1252'?>
    <frame name="pippo" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.axioma.it/AXI Frames.xsd" xmlns="http://www.axioma.it/AXI">
    <vo name="prova">
    <xi:include href="Incluso.xml" parse="xml"/>
    </vo>
    </frame>
    The validate Xlm fails with this error
    Error(4,45): <Line 4, Column 45>: XML-24534: (Error) Element 'include' not expected.
    How can avoid this ?
    Did I forget something ?
    Tks
    Tullio

    I'm quite new and I don't know exactly the syntax You are speaking about.
    I just need to create an xml file, wich is validated by Frames.xsd, including in it some other xml fragments I need to reuse.
    In my code I named 2 xmlspaces, my own and xi wich refers to include specification and I thought it was enough in order to use XInclude specification, is it wrong ?
    How can I specify what I need ?
    Tks
    Tullio

Maybe you are looking for

  • The security validation for this page is invalid – Infopath 2010

    Hello Experts, I have created browser enabled Infopath form and written a custom code (infopath 2010). I have a "Save" button on a form that submits the data into multiple relational sharepoint list. While debugging through VSTA everything goes well

  • Iphone Battery Problems - Randomly Turning Off

    I've had my iPhone 3GS 32GB since around October last year and all has been well until about a week ago. I was on firmware 3.1.2 and my phone started to randomly turn itself off, even when the battery was displaying a high percentage. Before this I h

  • New Windows Server 2012 install won't boot after installing Hyper-V role.

    I have just installed Windows Server 2012 onto a Dell PowerEdge R310.  Everything worked okay until I installed the Hyper-V role.  After that, when it tries to boot, I get "Your PC ran into a problem and needs to restart. We're just collecting some e

  • Debugging in JDeveloper

    I cannot debug in JDeveloper. When I try to debug I get an error that some class is not found. Has someone got an idea regarding this?

  • Email pictures

    How do you email out a picture? I don't see anything to add an attachment, or can this not be done. Also, if i receive an email with a picture, can i then save that picture on the iphone. Thanks!