Xmldom.writeToBuffer truncates node content?

I'm facing a problem using
PROCEDURE writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2);
Apparently the buffer gets truncated. Does anybody else have the same problem?

Sorry, it was my fault!
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Fabio Grassi:
I'm facing a problem using
PROCEDURE writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2);
Apparently the buffer gets truncated. Does anybody else have the same problem?<HR></BLOCKQUOTE>
null

Similar Messages

  • Classgeneratorwizard extension plugin - "cannot create node content" error

    Hi,
    I updated latest ESDK in jdev, I tried executing the "ClassGeneratorWizard" plugin from " Tools & right click project", in both the cases, after 3rd step ie. clicking "finish", i'm getting an error dialog saying "cannot create node content".
    What can be the issue ?
    About jdeveloper versions
    1. jdev version 10.1.3.3.0.4157
    2. windows xp sp2
    3. java platform - 1.5.0_06

    Seems like there is a slight problem with the following two lines :
    JavaManager javaMgr = JavaManager.getJavaManager(prj);
    SourceFile javaFile = javaMgr.getSourceFile(node.getURL());
    in the createContent method of the realWizard class.
    I'll let the developer know about it.

  • Can not add nodes (content and folder) into repositories

    Hi all,
    I have configured MS SQL database with WebLogic portal 10.2 without any error.
    Then i successfully created around 142 nodes under repository. But after that, when i try to create any new node
    server is throwing following exception:
    <Mar 26, 2009 8:07:32 PM GMT+05:30> <Error> <ContentManagement> <BEA-000000> <
    com.bea.content.RepositoryException: weblogic.jdbc.base.BaseBatchUpdateException: [BEA][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK_CM_PROPERTY'. Cannot insert duplicate key in object 'dbo.CM_PROPERTY'.
    at com.bea.content.internal.server.common.dbaction.Batcher.processWithRetries(Batcher.java:132)
    at com.bea.content.internal.server.common.dbaction.Batcher.processAnyRemainingItems(Batcher.java:70)
    at com.bea.content.repo.internal.server.dao.PropertyDao.insert(PropertyDao.java:335)
    at com.bea.content.repo.internal.server.persister.JDBCNodePersister.createNode(JDBCNodePersister.java:121)
    at com.bea.content.repo.internal.server.logic.NodeOpsLogic.create(NodeOpsLogic.java:204)
    Truncated. see log file for complete stacktrace
    weblogic.jdbc.base.BaseBatchUpdateException: [BEA][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK_CM_PROPERTY'. Cannot insert duplicate key in object 'dbo.CM_PROPERTY'.
    at weblogic.jdbc.sqlserver.SQLServerImplStatement.getBatchRowsAffectedCount(Unknown Source)
    at weblogic.jdbc.base.BasePreparedStatement.executeBatch(Unknown Source)
    at weblogic.jdbcx.base.BaseStatementWrapper.executeBatch(Unknown Source)
    at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:154)
    at com.bea.content.internal.server.common.dbaction.Batcher.processWithRetries(Batcher.java:114)
    Truncated. see log file for complete stacktrace
    >
    Exception: com.bea.content.RepositoryException: weblogic.jdbc.base.BaseBatchUpdateException: [BEA][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK_CM_PROPERTY'. Cannot insert duplicate key in object 'dbo.CM_PROPERTY'.
    But after cleaning CM_PROPERTY table from database, i could successfully create any new node.
    Why i am not able to create more than 142 nodes in repository?

    Here's some snippets of a valid SQL*Server config which shows some of the important transaction-related settings regarding how the <domain>/config/jdbc/*.xml scripts should be configured:
    - portalDataSourceNeverXA-jdbc.xml:
    <driver-name>weblogic.jdbc.sqlserver.SQLServerDriver</driver-name>
         <jdbc-data-source-params>
              <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
         </jdbc-data-source-params>
    - portalDataSource-jdbc.xml:
    <driver-name>weblogic.jdbc.sqlserver.SQLServerDriver</driver-name>
         <jdbc-data-source-params>
              <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
         </jdbc-data-source-params>
    - portalDataSourceAlwaysXA-jdbc.xml
    <driver-name>weblogic.jdbcx.sqlserver.SQLServerDataSource</driver-name>
         <jdbc-data-source-params>
    <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
         </jdbc-data-source-params>
    - p13nDataSource-jdbc.xml
              <driver-name>weblogic.jdbc.sqlserver.SQLServerDriver</driver-name>
         <jdbc-data-source-params>
              <global-transactions-protocol>None</global-transactions-protocol>
         </jdbc-data-source-params>
    - cgDataSource-nonXA-jdbc.xml
    <driver-name>weblogic.jdbc.sqlserver.SQLServerDriver</driver-name>
    <jdbc-data-source-params>
    <global-transactions-protocol>None</global-transactions-protocol>
    </jdbc-data-source-params>
    - cgDataSource-jdbc.xml
    <driver-name>weblogic.jdbc.sqlserver.SQLServerDriver</driver-name>
    <jdbc-data-source-params>
    <global-transactions-protocol>EmulateTwoPhaseCommit</global-transactions-protocol>
    </jdbc-data-source-params>
    Also please take a look at the Database Administration guide at http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/db/index.html -- it describes the process for creating the tables in your SQL*Server schema (necessary unless you do that via the config wizard)
    -Steve

  • Truncate Node: ORA-31167: XML nodes over 64K in size cannot be inserted

    I'm trying to migrate from a mysql platform to oracle. Mostly because the spatial engine from mysql sucks.
    I'm using Oracle-XE. I'm trying to import GeoCaching gpx files. The file contains 500 waypoints and one of the waypoints has a description greater than 64K. Since a palm pda can't handle that much text in CacheMate I'm fine with truncating the node.
    Is there a way to tell XMLType to truncate any node over 64K?
    Thanks.

    Hello,
    I am also running into this problem using and Oracle 10.1.0.5 version of the database. Unfortunately I do not see our customer updating their version in the near future.
    I am inserting customer data into a table with an XMLType column. There is currently no problem with inserting the data and as far as I can tell this data is not being truncated. However, when fetching this data I get the ORA-31167 error. It seems that when I execute the parser to fetch, using the extractvalue method to sort the result set based on nodes in the XMLType column.
    My solutions seem limited as I must present the data in a user defined order, I can not change the content of the XML and the customer will not be updating their version of oracle soon. Is there another way around this problem ?

  • OSB: Check if node contents is dateTime

    How can i determine if the contents of a node is a dateTime using XQuery in OSB

    Probably the simplest way is not to use XQuery but use a defined XML schema for the message which specified a field should be a dateTime and validate the inbound message against the schema.
    I suspect there's more behind the question than just "how can I do this?" though - what is it you're actually doing?
    Paddy

  • How to read xml node content from java[ urgent]

    My tag is
    <person1> a="hello">
    <person><first>Steve</first></person>
    </person1>
    I want if i read <person1> tag then it store its inner content in a string.
    i.e my output should be
    <person><first>Steve</first></person>

    Hi, parse the file using dom.then print out the root tag.you will have to strip the indentation this way.or you could use sax.

  • How to get the value of a node content in XML Literal in BPEL 2.0?

    Hi!
    I have a Problem Build A Expression in activity allocation XML Literal one, I would like to help me ...
    Well, I have the same activity in BPEL 1.0 version and now is Different is BPEL 2.0,
    I have a Web Service < WSEjecutaComandos > Where to have a function Remote Commands That runs ,
    Inputs my Web Service: " numEquipo int , String [ ] comandos , int numCta , int publicar , int version ,  String fecha"
    The second argument is a string array type ..
    Now in my BPEL process , I make is the following assignment:
    <assign name="AssignCreaPath">
                        <copy>
                            <from>
                             <literal>
                                  <fnCRexecElement xmlns="http://servicios/">
                                       <numEquipo>2</numEquipo>
                                       <comandos>mkdir etl/entradas/mmkis/</comandos>
                                       <numCuenta>1</numCuenta>
                                       <publicar>0</publicar>
                                 </fnCRexecElement>
                            </literal>
                            </from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters</to>
                        </copy>
                        <copy>
                            <from>concat(ora:getContentAsString($InvokeClear_fnCRexec_InputVariable.parameters/comandos),$inputVariable.payload/client:fecha)</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/comandos</to>
                        </copy>
                        <copy>
                            <from>$InvokeVersion_fnGetVersionProcesoByFecha_OutputVariable.parameters/version</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/version</to>
                        </copy>
                        <copy>
                            <from>$inputVariable.payload/client:fecha</from>
                            <to>$InvokeClear_fnCRexec_InputVariable.parameters/fecha</to>
                        </copy>
                    </assign>
    Well the conflict that I have is this,
    previously defined a assign with XML Fragment copied it to the payload to the input variable Web Service (WSEjecutaComandos),
    and the XML is copied in each of the variables ,
    Then concatenate input values ( I remarked in red) < comandos > with the value from "fecha" ( String) , and again copy Variable < comandos > and did not have any problems
    but now with the new BPEL 2.0, I do the same thing using now Literal XML ( that good!) but the option to concatenate (I remarked in red) and copied to the same variable ( I remarked in blue ), I mark the following error :
    I should know, I'm doing wrong That , or you need to make XPath Function That The Value They already have the variable < comandos> will concatenate fecha ,
    and is the final value for my entry my Web Service.
    must be defined as the type values array <comandos[i]>
    define the following activities before $InvokeClear_fnCRexec_InputVariable.parameters/comandos[1],
    but it seems that this BPEL 2.0 does not respect me as index brackets .
    Thank you...
    Cheers,

    thanks for your help , it served me!
    I need to get the value of XMLNodeList <comandos> to concatenate the date.
    Attempt to XPath function ( ora:getContentAsString(NodeList elementAsNodeList)), but returns me a String, but a nodoXML.
    Cheers,
    Maby

  • GetNodeValue does not return the full content of the node

    Hello
    Sometimes, the getNodeValue method truncate the content of the node I want to read.
    I don't understant why...
    I checked my XML with an XML validator, and it is ok.
    And it seems that it truncates the text after a specific number of characters (around 77).
    Does somebody have encountered this before?
    Thank you for your help!
    Emmanuel

    We're having the same problem. It would truncate after just a few characters, and does not happen all the times.
    MH.
    Hello
    Sometimes, the getNodeValue method truncate the
    content of the node I want to read.
    I don't understant why...
    I checked my XML with an XML validator, and it is ok.
    And it seems that it truncates the text after a
    specific number of characters (around 77).
    Does somebody have encountered this before?
    Thank you for your help!
    Emmanuel

  • Parsing Very Slow on Node with 1MB of content

    Hi,
    I am processing and XML file that has one node that has a lengthy content string in it. The content string is actually HTML with the various escape sequences in place, but no additional XML nodes. So it looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <value>
    ~1MB of escaped HTML here
    </value>
    This is very slow (several minutes) parsing it into a DOM as well as just using the SAX parser. I am using JDK 1.3.1 and have tried both the 1.4.4 and 2.4 versions of Xerces. The problem does not appear to be the escape characters since we have tried changing the node content to base 64 encoding with slower results.
    Any help will be greatly appreciated.
    MR

    Mind you, minutes for 1Mb seems extreme by any measure.
    If the document is really that simple, then you can process it directly without going through an XML parser.
    Sylvia.

  • CQ's built-in search requires jcr:content nodes?

    I'd like to build my data model within CQ5 while at the same time using CQ5's built-in search.  It seems I must 'inflate' my data model with unnecessary  jcr:content nodes in order to do so.
    This is what I'd like:
    /content/myapp/data/recipes [myapp:recipeList]
    /content/myapp/data/recipes/recipe1 [myapp:recipe]
    /content/myapp/data/recipes/recipe2 [myapp:recipe]
    /content/myapp/data/categories [myapp:categoryList]
    /content/myapp/data/categories/Thai [myapp:recipe_category]
    /content/myapp/data/categories/Indian [myapp:recipe_category]
    /content/myapp/data/categories/Vegan [myapp:recipe_category]
    In this 'reduced' model, all my properties can be added to my child nodes.  Seems to be searchable though:
    - *List nodes must extend cq:page
    - the recipe and category nodes must be nested within a jcr:content node
    - the recipe and category nodes must extend cq:page instead of nt:unstructured
    - the recipe properties must be nested within yet another layer of jcr:content nodes
    /content/myapp/data/recipes [myapp:recipeList]
    /content/myapp/data/recipes/jcr:content/recipe1 [myapp:recipe]
    /content/myapp/data/recipes/jcr:content/recipe2 [myapp:recipe]
    /content/myapp/data/recipes/jcr:content/recipe1/jcr:content/recipeproperties [myapp:recipeprops]
    /content/myapp/data/recipes/jcr:content/recipe2/jcr:content/recipeproperties [myapp:recipeprops]
    /content/myapp/data/categories [myapp:categoryList]
    /content/myapp/data/categories/jcr:content/Thai [myapp:recipe_category]
    /content/myapp/data/categories/jcr:content/Indian [myapp:recipe_category]
    /content/myapp/data/categories/jcr:content/Vegan [myapp:recipe_category]
    What value do I obtain from adding all the extra jcr:content nodes?

    Ideally, the model above would 'cleaner' like the example described in this CRX tutorial: http://dev.day.com/docs/en/crx/current/developing/data_modeling.html#The%2520Repository%25 20Model

  • PL/SQL XML Parser (problem getting text of a node)

    I am trying to get the contents of an ELEMENT (node with a CDATA section) using xmldom.getNodeValue(). However, it seems that there is a MAXIMUM number of characters that I can get back.
    I think I've found a work-around using xmldom.writeToBuffer() which seems to write all of the CDATA contents to a VARCHAR2 variable. Now my problem is that it is using strings like '&#60' and '&#38'. I recognize these strings as being "internal representations of '<' and '&' respectively. I'd not have to replace every occurence of these types of strings with the ASCII equivalent -especially since I don't know all of the possible '&#nn' strings that may crop up.
    Help!

    The use of "//" or "\\" appears to be a bug in JServer. It has
    been filed. You should not specify the path as a shared
    directory as a workaround.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Andre (guest) wrote:
    : Oracle 8.1.5 database on NT
    : When i try running the example with command:
    : SQL*Plus> exec domsample
    : ('//SERVER_03/ORACLE/xml_tmp','family.xml', 'err.txt');
    : I get the following error:
    : ERROR at line 1:
    : ORA-20100: Error occurred while parsing:
    : //ORACLE/xml_tmp/err.txt
    : ORA-06512: at "OEF1_MGR.XMLPARSER", line 43
    : ORA-06512: at "OEF1_MGR.XMLPARSER", line 120
    : ORA-06512: at "OEF1_MGR.DOMSAMPLE", line 80
    : ORA-06512: at line 1
    : If i use backward-slashes '\' which should be OK for NT i get:
    : ORA-20100: Error occurred while parsing:
    : \\ORACLE\xml_tmp/err.txt
    : I tried using a directory (create directory ...) but this
    : results in the same error.
    : Thus anyone now how it should be done?
    : Thanks
    null

  • How to retrieveText Node value

    I am generating an xml doc containing two set of data (one from ord table corresponding to orderId passed to the stored proc from calling app) and then appending child nodes for the values coming as In parameter. When I try to get the value of text node of the child element which has been appended through code, I am getting no values (I could only get to the first child value by (<xsl:value-of select="/EQUITYCONNECT//text()"/>). If I have to get the values of ORD_ID,EXECSIDE and SECURITY node in /EQUITYCONNECT/EXECRPT, how will the XPATH expression coded. (<xsl:value-of select="/EQUITYCONNECT/EXECRPT/EXECSIDE/text()"/> returns null value.
    Here is the code segment
    PROCEDURE xmlRules(orderID NUMBER,execSide NUMBER,security VARCHAR2) IS
    p xmlparser.Parser;
    xmldoc xmldom.DOMDocument;
    docnode xmldom.DOMNode;
    newele xmldom.DOMElement;
    newele1 xmldom.DOMElement;
    newelenode xmldom.DOMNode;
    newelenode1 xmldom.DOMNode;
    textele xmldom.DOMText;
    newtextelenode xmldom.DOMNode;
    compnode xmldom.DOMNode;
    nl xmldom.DOMNodeList;
    n xmldom.DOMNode;
    len number;
    rootnode xmldom.DOMNode;
    vbuffer varchar2(32767);
    line varchar2(4000);
    ordQueryCtx DBMS_XMLGen.ctxHandle;
    execRpt CLOB;
    result CLOB;
    result1 CLOB;
    xmlout VARCHAR2(4000);
    strResult VARCHAR2(4000);
    strResult1 VARCHAR2(4000);
    prtOut VARCHAR2(255);
    begin
    -- new parser
    p := xmlparser.newParser;
    -- set some characteristics
    xmlparser.setValidationMode(p, FALSE);
    -- xmlparser.setErrorLog(p, dir || '/' || errfile);
    xmlparser.setPreserveWhiteSpace(p, TRUE);
    -- set up the query context...!
    ordQueryCtx := DBMS_XMLGen.newContext('select * from ord where ord_id ='|| orderID);
    dbms_xmlgen.setrowsettag(ordQueryCtx,'EQUITYCONNECT');
    dbms_xmlgen.setrowtag(ordQueryCtx,'ORDER');
    -- get the result..!
    result := DBMS_XMLGen.getXML(ordQueryCtx);
    -- Turn into string (test purposes only)
    strResult := dbms_lob.SUBSTR(result);
    -- parse xml file
    xmlparser.parseclob(p,result);
    -- get document
    xmldoc := xmlparser.getDocument(p);
    -- get all elements of document
    nl := xmldom.getElementsByTagName(xmldoc, '*');
    len := xmldom.getLength(nl);
    -- check if number of element nodes are atleast 2
    if len > 1 then
    dbms_output.put_line('Document has more than two elements including Root');
    -- get root element of document
    rootnode := xmldom.item(nl,0);
    -- get the element next to the root element
    n := xmldom.item(nl, 1);
    -- make node for dom document
    docnode := xmldom.makeNode(xmldoc);
    -- create a new element node
    newele := xmldom.createElement(xmldoc, 'EXECRPT');
    newelenode := xmldom.makeNode(newele);
    newele1 := xmldom.createElement(xmldoc, 'ORD_ID');
    newelenode1 := xmldom.makeNode(newele1);
    compnode := xmldom.appendChild(newelenode, newelenode1);
    -- create a new text node
    textele := xmldom.createTextNode(xmldoc, orderID);
    newtextelenode := xmldom.makeNode(textele);
    -- append text node to element node
    compnode := xmldom.appendChild(newelenode1, newtextelenode);
    newele1 := xmldom.createElement(xmldoc, 'EXECSIDE');
    newelenode1 := xmldom.makeNode(newele1);
    compnode := xmldom.appendChild(newelenode, newelenode1);
    -- create a new text node
    textele := xmldom.createTextNode(xmldoc, execSide);
    newtextelenode := xmldom.makeNode(textele);
    -- append text node to element node
    compnode := xmldom.appendChild(newelenode1, newtextelenode);
    newele1 := xmldom.createElement(xmldoc, 'SECURITY');
    newelenode1 := xmldom.makeNode(newele1);
    compnode := xmldom.appendChild(newelenode, newelenode1);
    -- create a new text node
    textele := xmldom.createTextNode(xmldoc, security);
    newtextelenode := xmldom.makeNode(textele);
    -- append text node to element node
    compnode := xmldom.appendChild(newelenode1, newtextelenode);
    -- insert the node just after the parent node
    newelenode := xmldom.insertBefore(rootnode, newelenode, n);
    -- Perform these two operations to avoid ORA-20000 (cannot write to NULL CLOB)
    dbms_lob.createtemporary(result1, true, dbms_lob.session);
    dbms_lob.open(result1, dbms_lob.lob_readwrite);
    xmldom.writetoclob(docnode,result1);
    strResult1 := dbms_lob.substr(result1);
    xmldom.writeToBuffer(docnode, vbuffer);
    -- print the output stored in buffer
    loop
    exit when vbuffer is null;
    line := substr(vbuffer,1,instr(vbuffer,chr(10))-1);
    dbms_output.put_line('| '||line);
    vbuffer := substr(vbuffer,instr(vbuffer,chr(10))+1);
    end loop;
    -- Call Java function which takes (varchar2, varchar2) as args
    xmlout := transform_xml(strResult1, '<html xsl:version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    lang="en">
    <head>
         <title>Order Report</title>
    </head>
    <body>
         <table border="1">
         <tr>
              <th>Row Number</th>
              <th>Order ID</th>
              <th>Order ID</th>
              <th>Txn</th>
              <th>Security</th>
              <th>Quantity</th>
         </tr>
         <xsl:for-each select="EQUITYCONNECT">
              <!-- order the result by revenue -->
              <xsl:sort select="ORD_ID"
                   data-type="number"
                   order="ascending"/>
              <tr>
              <td>
                   <xsl:value-of select="ORDER/ORD_ID"/>
              </td>
              <td>
    <xsl:value-of select="/EQUITYCONNECT//text()"/>          </td>
         </tr>
         </xsl:for-each>
         </table>
    </body>
    </html>');
    -- Close the query context
    DBMS_XMLGen.closeContext(ordQueryCtx);
    end if;
    exception
    when xmldom.INDEX_SIZE_ERR then
    raise_application_error(-20120, 'Index Size error');
    when xmldom.DOMSTRING_SIZE_ERR then
    raise_application_error(-20120, 'String Size error');
    when xmldom.HIERARCHY_REQUEST_ERR then
    raise_application_error(-20120, 'Hierarchy request error');
    when xmldom.WRONG_DOCUMENT_ERR then
    raise_application_error(-20120, 'Wrong doc error');
    when xmldom.INVALID_CHARACTER_ERR then
    raise_application_error(-20120, 'Invalid Char error');
    when xmldom.NO_DATA_ALLOWED_ERR then
    raise_application_error(-20120, 'Nod data allowed error');
    when xmldom.NO_MODIFICATION_ALLOWED_ERR then
    raise_application_error(-20120, 'No mod allowed error');
    when xmldom.NOT_FOUND_ERR then
    raise_application_error(-20120, 'Not found error');
    when xmldom.NOT_SUPPORTED_ERR then
    raise_application_error(-20120, 'Not supported error');
    when xmldom.INUSE_ATTRIBUTE_ERR then
    raise_application_error(-20120, 'In use attr error');
    when others then
    dbms_output.put_line('exception occured' || sqlcode || substr(sqlerrm, 1, 100));
    end xmlRules;
    function xml_transform is taking the xml and xsl file as string and returning me xml as string after processing. Basiccally I have to do some comparison on the value of /EQUITYCONNECT/ORDER elements and /EQUITYCONNECT/EXECRPT element.
    Any help will be appreciated.

    Here you go:
           Node nameNode =
                    (Node) XPathFactory.newInstance().newXPath().evaluate(
                            "/root/name", doc, XPathConstants.NODE);
            nameNode.setTextContent("bob");

  • Problem retrieving Data from a CDATA-Section using XMLDOM

    Hello,
    Ware: Oracle 8.1.7.4 64bit, XDK for PL/SQL Version 9.2.0.3, Solaris8 64bit
    I can't retrieve Data from the CDATA-Section of an XML-String, neither with
    getData(DOMCharacterData) or substringData. Also getLength fails. I get always
    the following error:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
    ORA-06512: at "XML_SCHEMA.XMLCHARDATACOVER", line 0
    ORA-06512: at "XML_SCHEMA.XMLDOM", line 853
    ORA-06512: at "SCHWABE.XML_TEST", line 47
    ORA-06512: at line 1
    I can successfully cast the DOMNode to a CharacterData with makeCharacterData
    and check with isNull (DOMCharacterData) (returns FALSE).
    My Testcase:
    1) A Function which build a XML-Document:
    CREATE OR REPLACE FUNCTION XML_ResponseCalc RETURN VARCHAR2 IS
    doc VARCHAR2(32767);
    BEGIN
    doc :=
    '<?xml version="1.0" encoding="UTF-8"?>
    <RSDecEng>
    <Version>1.00</Version>
    <ResponseCalc>
    <ID>00000000000000000014</ID>
    <Burst>
    <Definition>
    <Count>1</Count>
    <ID>
    <Start>1</Start>
    <Length>4</Length>
    </ID>
    <Var>
    <Name>Risiko_1</Name>
    <Start>5</Start>
    <Length>5</Length>
    </Var>
    </Definition>
    <Data>
    <Length>9</Length>
    <Count>5</Count>
    <![CDATA[
    1 0.001
    2 0.002
    3 0.003
    4 0.004
    5 0.005
    6 0.006
    7 0.007
    8 0.008
    9 0.009
    10 0.010
    ]]>
    </Data>
    </Burst>
    </ResponseCalc>
    </RSDecEng>
    2) The Procedure which parses the XML-Document (no Exception-Handling):
    CREATE OR REPLACE PROCEDURE XML_TEST IS
    Parser XML_SCHEMA.XMLParser.Parser;
    DOMDocument XML_SCHEMA.XMLDOM.DOMDocument;
    DOMNode XML_SCHEMA.XMLDOM.DOMNode;
    DOMNodeItem XML_SCHEMA.XMLDOM.DOMNode;
    DOMNodeList XML_SCHEMA.XMLDOM.DOMNodeList;
    DOMCharacterData XML_SCHEMA.XMLDOM.DOMCharacterData;
    TheDocument CLOB;
    ID VARCHAR2(100);
    Data VARCHAR2(200);
    BEGIN
    -- LOB
    DBMS_LOB.CREATETEMPORARY(TheDocument, TRUE);
    DBMS_LOB.WRITEAPPEND(TheDocument, LENGTH(XML_ResponseCalc), XML_ResponseCalc);
    -- Parse
    Parser := XML_SCHEMA.XMLParser.NewParser;
    XML_SCHEMA.XMLParser.ParseCLOB(Parser, TheDocument);
    DOMDocument := XML_SCHEMA.XMLParser.GetDocument(Parser);
    XML_SCHEMA.XMLParser.FreeParser(Parser);
    -- Node
    DOMNode := XML_SCHEMA.XMLDOM.MakeNode(DOMDocument);
    -- Get ID
    DOMNodeList := XML_SCHEMA.XSLProcessor.SelectNodes
    (DOMNode,'/RSDecEng/ResponseCalc/ID/text()');
    IF XML_SCHEMA.XMLDOM.GetLength(DOMNodeList) > 0 THEN
    DOMNodeItem := XML_SCHEMA.XMLDOM.Item(DOMNodeList, 0);
    XML_SCHEMA.XMLDOM.WriteToBuffer(DOMNodeItem, ID);
    SYS.DBMS_OUTPUT.PUT_LINE ('ID: '||ID);
    END IF;
    -- Get CDATA
    DOMCharacterData := XML_SCHEMA.XMLDOM.MakeCharacterData(DomNode); -- <-- ok here...
    IF NOT XML_SCHEMA.XMLDOM.isNull (DOMCharacterData) THEN -- <-- ...and here
    Data := XML_SCHEMA.XMLDOM.GETDATA(DOMCharacterData); -- <-- ...but here Exception raise
    END IF;
    END;
    I hope you can help me.
    Thank you in advance
    Markus Schwabe

    You need to notice the definitions for makecharacterdata:
    FUNCTION makeCharacterData(n DOMNode) RETURN DOMCharacterData;
    PURPOSE
    Casts given DOMNode to a DOMCharacterData
    It only do the casting.

  • End of communication file error ....for xmldom

    Hi,
    Below is a procedure that i am executing.
    I am using NOCOPY For the clob variable.
    While executing the procedure for an xml value for clstring i am getting an error like
    --end of communication channel.
    The xml data is very big but not more that the size for clob.
    procedure Prc_UpdateNodes(clString in out NOCOPY CLOB, nodename varchar2, nodeValue varchar2) is
            l_doc_node xmldom.DOMNode;
            l_xml_out varchar2(2000);
            begin
                      domDocument      := Fn_GetXmlDocument(clString);
                   nodeList           := xmldom.getElementsByTagName(domDocument, nodename);
                   intNoOfNode       := xmldom.getLength(nodeList);
                   l_doc_node := xmldom.item(nodeList, 0);
                   --xmldom.writetobuffer(l_doc_node, l_xml_out);
                   PKS_DEBUG.PRC_DEBUG('CLOB IN PRC_UPDATE' || clString);
                   for loopCount_int in 0.. intNoOfNode - 1  loop
                     node := XmlDom.item(nodeList, loopCount_int);
                        valueNode := XmlDom.getFirstChild(node);
                        --xmldom.writetobuffer(node, l_xml_out);
                        --This return value would be useful only in case of single record where in we could use the same after the insert operation is done
                        -- so that it could be used for the subsequent retrieval.
                        -- In case of multiple records update, this information remains of no use and doesnt have to be handled.
                        XmlDom.setNodeValue(valueNode,nodeValue);
                        --xmldom.writetobuffer(valueNode, l_xml_out);
                   end loop;
                   PKS_DEBUG.PRC_DEBUG('CLOB AFTER PRC_UPDATE' || clString);
                   XmlDom.writeToClob(domDocument,clString);
                   PKS_DEBUG.prc_debug('REMOVING BUFFER');
                  PRC_REMOVE_BUFFER(clString);
                   PKS_DEBUG.PRC_DEBUG('CLOB AFTER WRITITNG TO CLOB' || clString);
            end;The error occurs during the execution of the statement XmlDom.writeToClob(domDocument,clString);
    Do i need the above statement as i am using NOCOPY For the CLOB variable.
    Can anyone help me with this front..
    Thanks.

    checkout TNSPING <service name> from cmd prompt
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\NJi>tnsping issl
    TNS Ping Utility for 32-bit Windows: Version 2.3.2.1.0 - Production on 25-OCT-06
    14:36:06
    Copyright , 1996(c) Oracle Corporation 1995. All rights reserved.
    Attempting to contact (ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=198.1.2.
    15)(Port=1521))
    OK (100 msec)

  • Using xmldom.writeToClob to update xml clob corrupts clob

    We are storing an xml document in a clob field in the db. As part of a data check we need to parse the xml and possibly remove a node. I can do that, and check the results using 'xmldom.writeToBuffer'.
    When I try to write the data back to the db using 'xmldom.writeToClob' I get strange results. Data seems to be appended to the end of the clob and contains chr(13) characters at the end of each line.
    Also does anyone know if the existence of whitespace in the xml clob would cause a parse/search to be slower?
    I am new to xml and might be missing something fairly basic in the following code. Thanks in advance for any help.
    Here is some of the code:
    doc xmldom.DOMDocument;
    curNode xmldom.DOMNode;
    parentNode xmldom.DOMNode;
    theNodeList xmldom.DOMNodeList;
    str varchar2(4000);
    begin
    -- open xml_rec cursor (xml is the clob field opened for update)
    -- Loop through all item elements
    theNodeList := xmldom.getElementsByTagName(doc, 'item');
    for m in 0..xmldom.getLength(theNodeList)-1 loop
    curNode := xmldom.item(theNodeList,m);
    --perform a check and possibly delete the current node
    parentNode := xmldom.getParentNode(curNode);
    parentNode := xmldom.removechild(parentNode, curNode);
    xmldom.writeToBuffer(doc, str);
    --I check the results here and everything looks good
    xmldom.writeToClob(doc, xml_rec.xml);
    --When I check the clob the data is incorrect.
    null

    The next cod is a sample of the implementation xmldom.writeToClob used xmldom.DOMNode in the parameter of input.
    DECLARE
    XMLOut CLOB := EMPTY_CLOB();
    XMLIn Varchar2(2000);
    XSLPath Varchar2(2000);
    BEGIN
    DBMS_LOB.CREATETEMPORARY(XMLOut,TRUE); -- Give permit
    DBMS_LOB.OPEN (XMLOut, DBMS_LOB.LOB_READWRITE); --open the file of read and write
    XSLPath := '/users/gcardona/plantillas/report.xsl';
    GE_BSXMLCONVERT.createElementName('COLUMN');
    GE_BSXMLCONVERT.createElementAttribute('name', 'OUTXML');
    GE_BSXMLCONVERT.addElement();
    GE_BSXMLCONVERT.createElementName('table');
    GE_BSXMLCONVERT.createElementAttribute('name', 'X1');
    GE_BSXMLCONVERT.createElementAttribute('width', '100');
    GE_BSXMLCONVERT.addElement();
    XMLIn := GE_BSXMLCONVERT.toXML();
    XSLTranform(XMLIn, XSLPath, XMLOut);--XMLOut is a variable in out in the procedure,
    --here is where is return the file XML Process
    insert into in_prueba (ID,XML_CLOB) values (200, XMLOut);
    DBMS_LOB.CLOSE (XMLOut); -- Close File
    DBMS_LOB.FREETEMPORARY(XMLOut); --free memory
    GE_BSXMLCONVERT.clearMemory();
    commit;
    END;
    null

Maybe you are looking for

  • Win7 install with multiple/all the FAILS! Satellite P750 (PART NO. PSAY3A-02T001)

    Laptop: Toshiba Satellite P750 (PART NO. PSAY3A-02T001) Installing: Windows 7 Home Premium SP1 (64 bit) Background: Laptop is around 2-3 years old now. Formatting and installing a fresh copy of Win7. Doing this for a close friend. Issue #1: Using the

  • Dynamic Select List Allowed Values

    Howdy Folks, I am trying to allow end users to select their username. The usernames are generated from a rule library, and displayed in a select form element. I am doing this by having the allowedValues call the rule that generates the possible names

  • Change attributes and/or permissions of folder

    I have searched for this and the answers are not working. I have an app where I copy a folder on a CD onto the C drive. When the app is completed I want to delete the folder. I can't seem to do that with my code. I can manually go to the folder in ex

  • HT201300 MacBook runs slow: how to speed up slow system

    Mac unresponsive at times. Constantly seeing the color wheel.  System trying to process but is having a hard time with every program.

  • FlashVars into AS3 Project.....!!?

    I am working in AS3, I know what needs to be done in AS2. I am needing to pass the FlashVars value to my swf. the FlashVars variable statement for this example is hard coded, but is actually dynamic data being passed from CF. So, to simplify this, I