Problem with XML element creation

hello,
i have a problem creating an XML element using XMLForest
and XMLConcat in Oracle 9.2.0.3 release.
This problem there wasn't when we had the Oracle 9.2.0.2
release.
If i make this statement:
SELECT XMLELEMENT( "message",
XMLATTRIBUTES( 1321324 AS IDSEQ,
'fff' AS CDMS,
'fff' AS TPMS,
SYSDATE AS TIME,
342134 AS REFID),
XMLCONCAT( XMLELEMENT("header",
XMLFOREST( 'ttt' AS TXID,
'rrr' AS RXID,
'QQQ' AS QUEUENAME,
XMLFOREST( 123456789 AS COD_COM,
111 AS ID_CAT,
'www' AS ID_ITM,
1123 AS PR_KEY,
'ST' AS STATUS) AS REFOBJ)),
xmltype('<body>gfgfg</body>') )).getstringval() FROM dual;
i got this XML document:
<message IDSEQ="1321324" CDMS="fff" TPMS="fff" TIME="28-MAR-03" REFID="342134">
<body>gfgfg</body>
</message>
D>rrr</RXID>
<QUEUENAME>QQQ</QUEUENAME>
<REFOBJ>
<COD_COM>123456789</COD_COM>
<ID_CAT>111</ID_CAT>
<ID_ITM>www</ID_ITM>
<PR_KEY>1123</PR_KEY>
<STATUS>ST</STATUS>
</REFOBJ>
</header>
instead of this:
<message IDSEQ="1321324" CDMS="fff" TPMS="fff" TIME="28-MAR-03" REFID="342134">
<header>
<TXID>ttt</TXID>
<RXID>rrr</RXID>
<QUEUENAME>QQQ</QUEUENAME>
<REFOBJ>
<COD_COM>123456789</COD_COM>
<ID_CAT>111</ID_CAT>
<ID_ITM>www</ID_ITM>
<PR_KEY>1123</PR_KEY>
<STATUS>ST</STATUS>
</REFOBJ>
</header>
<body>gfgfg</body>
</message>
any idea?
this happens only after we had installed the patch 9.2.0.3
thanks in advance
Mc

As Jim Stated the problem is related to using XMLCONCAT and a combination of SQL/XML non SQL/XML operators. In this example XMLCONCAT is not required. XMLElement allows multiple XMLType children to be included in the Element, as the attached SQL shows...
Christian please note that Oracle strongly recommend the use of the SQL/XML operators over ways of generating XML from SQL queries. All future development efforts will be focused on optimizing and improving this technology, rather that older, legacy approaches.
SQL> SELECT XMLELEMENT
2 ( "message",
3 XMLATTRIBUTES
4 (
5 1321324 AS IDSEQ,'fff' AS CDMS,'fff' AS TPMS,SYSDATE AS TIME,342134 AS REFID
6 ),
7 XMLELEMENT
8 (
9 "header",
10 XMLFOREST
11 (
12 'ttt' AS TXID,
13 'rrr' AS RXID,
14 'QQQ' AS QUEUENAME,
15 XMLFOREST
16 (
17 123456789 AS COD_COM,
18 111 AS ID_CAT,
19 'www' AS ID_ITM,
20 1123 AS PR_KEY,
21 'ST' AS STATUS
22 ) AS REFOBJ
23 )
24 ),
25 xmltype
26 (
27 '<body>gfgfg</body>'
28 )
29 ).getstringval()
30 FROM dual;
XMLELEMENT("MESSAGE",XMLATTRIBUTES(1321324ASIDSEQ,'FFF'ASCDMS,'FFF'ASTPMS,SYSDAT
<message IDSEQ="1321324" CDMS="fff" TPMS="fff" TIME="31-MAR-03" REFID="342134"><
header><TXID>ttt</TXID><RXID>rrr</RXID><QUEUENAME>QQQ</QUEUENAME><REFOBJ><COD_CO
M>123456789</COD_COM><ID_CAT>111</ID_CAT><ID_ITM>www</ID_ITM><PR_KEY>1123</PR_KE
Y><STATUS>ST</STATUS></REFOBJ></header><body>gfgfg</body>
</message>
SQL> select xmlelement("a", xmlelement("empno", empno), xmltype('<b>1</b>')) from emp;
XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
<a><empno>7369</empno><b>1</b>
</a>
<a><empno>7499</empno><b>1</b>
</a>
<a><empno>7521</empno><b>1</b>
</a>
<a><empno>7566</empno><b>1</b>
</a>
XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
<a><empno>7654</empno><b>1</b>
</a>
<a><empno>7698</empno><b>1</b>
</a>
<a><empno>7782</empno><b>1</b>
</a>
<a><empno>7788</empno><b>1</b>
XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
</a>
<a><empno>7839</empno><b>1</b>
</a>
<a><empno>7844</empno><b>1</b>
</a>
<a><empno>7876</empno><b>1</b>
</a>
XMLELEMENT("A",XMLELEMENT("EMPNO",EMPNO),XMLTYPE('<B>1</B>'))
<a><empno>7900</empno><b>1</b>
</a>
<a><empno>7902</empno><b>1</b>
</a>
<a><empno>7934</empno><b>1</b>
</a>
14 rows selected.

Similar Messages

  • Problem with installing Elements - from noob

    I have problems with installing Elements, it gives my an unknown mistake - I already have CS4 up and running, could this be the case?

    Chances are not very good that pse 4 will run on os x 10 6.8 unless you were upgrading from an earlier mac version that already had pse 4 installed.
    as per this:
    http://forums.adobe.com/message/4474236#4474236

  • Problem with XML on Linux

    hi everybody,
    I've a big problem with XML on Linux, in details I see my program stopping on Linux at the instruction
    XMLReader xr = XMLReaderFactory.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
    and it's strange because on Windows it runs and there aren't problems about permissions on files, does anyone knows what to do?
    thanks in advance!
    Stefano

    What happens on that line? I'm assuming you get some kind of error or exception.
    Make sure the JAR file for Crimson is in your classpath.

  • Problem with XML in APEX ORA-06502

    i, I have a problem with XML generation, I developed an application in APEX, and in a html page I have this process:
    declare
    l_XML varchar2(32767);
    begin
    select xmlElement
    "iva",
    xmlElement("numeroRuc",J.RUC),
    xmlElement("razonSocial", J.RAZON_SOCIAL),
    xmlElement("idRepre", J.ID_REPRE),
    xmlElement("rucContador", J.RUC_CONTADOR),
    xmlElement("anio", J.ANIO),
    xmlElement("mes", J.MES),
    xmlElement
    "compras",
    select xmlAgg
    xmlElement
    "detalleCompra",
    --xmlAttributes(K.ID_COMPRA as "COMPRA"),
    xmlForest
    K.COD_SUSTENTO as "codSustento",
    K.TPLD_PROV as "tpldProv",
    K.ID_PROV as "idProv",
    K.TIPO_COMPROBANTE as "tipoComprobante",
    to_char(K.FECHA_REGISTRO, 'DD/MM/YYYY') as "fechaRegistro",
    K.ESTABLECIMIENTO as "establecimiento",
    K.PUNTO_EMISION as "puntoEmision",
    K.SECUENCIAL as "secuencial",
    to_char(K.FECHA_EMISION, 'DD/MM/YYYY') as "fechaEmision",
    K.AUTORIZACION as "autorizacion",
    to_char(K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva",
    to_char(K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible",
    to_char(K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav",
    to_char(K.MONTO_ICE, 9999999999.99) as "montoIce",
    to_char(K.MONTO_IVA, 9999999999.99) as "montoIva",
    to_char(K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes",
    to_char(K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios",
    to_char(K.VALOR_RET_SERV_100, 9999999999.99) as "valorRetServ100"
    xmlElement
    "air",
    select xmlAgg
    xmlElement
    "detalleAir",
    xmlForest
    P.COD_RET_AIR as "codRetAir",
    to_char(P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir",
    to_char(P.PORCENTAJE_AIR, 999.99) as "porcentajeAir",
    to_char(P.VAL_RET_AIR, 9999999999.99) as "valRetAir"
    from ANEXO_COMPRAS P
    where P.ID_COMPRA = K.ID_COMPRA
    AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
    xmlElement("estabRetencion1", K.ESTAB_RETENCION_1),
    xmlElement("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
    xmlElement("secRetencion1", K.SEC_RETENCION_1),
    xmlElement("autRetencion1", K.AUT_RETENCION_1),
    xmlElement("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY')),
    xmlElement("docModificado", K.DOC_MODIFICADO),
    xmlElement("estabModificado", K.ESTAB_MODIFICADO),
    xmlElement("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
    xmlElement("secModificado", K.SEC_MODIFICADO),
    xmlElement("autModificado", K.AUT_MODIFICADO)
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    AND K.ID BETWEEN 1 AND 25
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    declare
    l_XML CLOB;
    begin
    --Oculta XML
    sys.htp.init;
    wwv_flow.g_page_text_generated := true;
    wwv_flow.g_unrecoverable_error := true;
    --select XML
    select xmlElement
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+

    JohannaCevallos07 wrote:
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+The likeliest explanation for this is that length of the XML exceeds 32K, which is the maximum size that <tt>htp.p</tt> can output. A CLOB can store much more than this, so it's necessary to buffer the output as shown in +{message:id=4497571}+
    Help us to help you. When you have a problem include as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.
    Thanks

  • Problem with Photoshop Elements Printing

    I have been using Photoshop Elements for a couple of years now and know it pretty well.  Today while attempting to print, a strange problem came up:  After going through the protocol to make a print, just before the image prints PE does a very fast auto correction that basically ruins all the color correction I have made on the image.  How do I disable this function?

    Hi and thanks for your reply. I checked the settings under "Print", "More Options", then "Color Management" and it only has "Print Space", none of the three options that you said I should have.  Am I looking in the wrong place?
    Date: Mon, 3 Sep 2012 11:14:57 -0600
    From: [email protected]
    To: [email protected]
    Subject: Problem with Photoshop Elements Printing
        Re: Problem with Photoshop Elements Printing
        created by 99jon in Photoshop Elements - View the full discussion
      Check your color management by clicking More Options in the print dialog There are basically three options:1) Printer Manages Color2) Elements Manages color3) No color Management Make sure everything is consistent e.g. if you choose Elements manages color make sure color management is switched off in the print driver. 
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4669848#4669848
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4669848#4669848. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Y have problems with Photoshop Elements 12  Bug after reinstallation complet  Impossible working ??

    Morning !
    We have many problems with PHOTOSHOP ELEMENTS 12 ?
    After installation on MAC OS X   YOSEMITE  .
    S O S !!

    Exporter vers photoshop do you receive any specific error messages?  In what way is Photoshop Elements 12 not working?

  • Problems with Photoshop Elements 11

    I have a problem with Photoshop Elements 11, which i bought last week. Installing was completed according the instructions. When I started to use the program my one year old HP-computer with Windows 8.1 informed that there a failure in the Photoshop program and the did not open.

    attach a screenshot of the error message.

  • Problem with premiere elements 4.0

    i am having
    problem
    with premiere elements 4.0. it keeps on crashing and when i put pictures on the timeline it comes up black. when i try to preview it either it shows black or sometimes the picture but i cant see it to delete if i wanted to. also it gave me a message something like that adbe is running low on memory and i should be caution

    This is aimed at Premiere Pro, but may help
    Work through all of the steps (ideas) listed at http://ppro.wikia.com/wiki/Troubleshooting
    If your problem isn't fixed after you follow all of the steps, report back with ALL OF THE DETAILS asked for in the FINALLY section, the questions at the end of the troubleshooting link... most especially the codec used... see Question 1

  • JDeveloper Extension Problem with Navigator Elements

    Hi,
    I have a problem with the elements of the JDev Navigator.
    At IDE startup I want to set an overlay for the elements on the active project.
    This function is implemented in the Subversion Extension too.
    How can I access the elements of an active project in the navigator?
    It is not a problem to set an overlay with the ContextMenuListener.
    Thank you for your help.
    Greetings,
    Benjamin Oelenberg

    Please take a look at the Extension SDK sample projects. There is a sample that does exactly this.
    Install the Extension SDK from the Help --> Check for Updates dialog and after restart, say yes to installing the sample projects.

  • I am facing a new problem with xml schema, plz help me

    Hi @,
    I am facing a problem with xml schema validation. Below is my code.
    public void initialize(String cfgFileName) {
    try {
    try {
    DOMParserWrapper parser = (DOMParserWrapper)Class.forName("dom.wrappers.DOMParser").newInstance();
    parser.setFeature( "http://apache.org/xml/features/dom/defer-node-expansion",true );
    parser.setFeature( "http://xml.org/sax/features/validation",true);
    parser.setFeature( "http://xml.org/sax/features/namespaces",true );
    parser.setFeature( "http://apache.org/xml/features/validation/schema",true );
    parser.setFeature( "http://apache.org/xml/features/validation/schema-full-checking",true );
    Document document = parser.parse(cfgFileName);
    System.out.println("Vijay .. code .. damar\n");
    }catch (org.xml.sax.SAXParseException spe) {
    } catch (org.xml.sax.SAXNotRecognizedException ex ){
    } catch (org.xml.sax.SAXNotSupportedException ex ){
    } catch (org.xml.sax.SAXException se) {
    if (se.getException() != null)
    se.getException().printStackTrace(System.err);
    else
    se.printStackTrace(System.err);
    }catch (Exception e) {
    System.out.println("Caught unknown exception : \n");
    e.printStackTrace(System.err);
    System.out.println("Vijay .. code .. success\n");
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    //docBuilder.setErrorHandler(myErrorHandler);
    cfg = docBuilder.parse(new File(cfgFileName));
    cfg .getDocumentElement ().normalize ();
    } catch (Exception e) {
    e.printStackTrace();
    In the above code I am parsing the xml file and i am doing schema validation. Schema validation is proper and it is validating correctly. Only problem is that, It is validating and showing error correctly correctly but it is not catching that error.
    For clear understanding I am printing one statement before parsing and after parsing.
    SYSTEM.OUT.PRINTLN("Vijay .. code .. damar\n") this is before parsing
    SYSTEM.OUT.PRINTLN("Vijay .. code .. success\n") this is after parsing
    Here what is happening means, It is validating correctly and showing error :
    [Error] nw_layout-new.xml:800:97: Datatype error: Value 'y' does not match regular expression facet 'yes|no'..
    Vijay .. code .. damar
    Vijay .. code .. success
    Here it is showing error and still continueing not catching.
    Plz give solution for this.
    Thanks
    vijay K

    Hello dipthebe,
    Check out the articles below go through troubleshooting steps for your iPhone when the screen is unresponsive. You may want to try and restore your iPhone as a new device and then test out what happens when you miss a call to see if the issue is still present afterwards.
    iPhone, iPad, iPod touch: Troubleshooting touchscreen response
    http://support.apple.com/kb/ts1827
    Use iTunes to restore your iOS device to factory settings
    http://support.apple.com/kb/HT1414
    Regards,
    -Norm G.

  • I recently upgraded our iMac to Yosemite OS and now have a problem with Photoshop Elements 11:  the move tool selects an image or text layer, but then I try to drag the selection somewhere else on the page and it snaps back to the original location, howev

    I recently upgraded our iMac to Yosemite OS and now have a problem with Photoshop Elements 11:  the move tool selects an image or text layer, but then I try to drag the selection somewhere else on the page and it snaps back to the original location, however the arrows will move it OK.  Also I cannot drag the selection to another photo in the photo bin as before.

    Hi,
    Please refer: http://helpx.adobe.com/photoshop-elements/kb/pse-stops-responding-yosemite.html
    Thanks,
    Anwesha

  • Problems with ps elements 10 on imac

    hi,
    i just downloaded the programm yesterday from the app store onto my imac. i want to use it as an extention to my aperture 3.
    I have the following questions/problems:
    + starting the programm takes at least 2 minutes, is this normal? I use an Imac Quadcore I7 with 12 gb onboard
    + the preferences: i can only extend the used memory up to 3gb, although i have 12 gb on board?
    + I can not store the preferences, when I shut the programm down, it tells me I do not have the legitimation to store the preferences?!
    + panorama foto work is mostly running out of memory?! 12gb on board
    Please can anybody help me?
    Thanks
    mikle

    No, it does not work on the other account. Problem is still/again the same. In the new account it works perfekt.
    Von meinem iPad gesendet
    Am 08.01.2012 um 22:16 schrieb "Barbara B." <[email protected]>:
    Re: problems with ps elements 10 on imac
    created by Barbara B. in Photoshop Elements - View the full discussion
    If it works in the new account it should hopefully work in your other account, so just log out of that one and go back to the old one and see if it does.
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4125222#4125222
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4125222#4125222. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Elements by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Problem with align element.

    Hi everybody,
    i have a problem with align element on my page. I explain:
    i have used into a panel page a panel group to align my element horizontal, but when i set the vertical-align on top, the element are align in middle.
    Now is......
    text text text text text text
    text text text text text text
    text text text text text text
    text text text text text text tablelayout
    text text text text text text
    text text text text text text
    text text text text text text
    But i wont........
    text text text text text text tablelayout
    text text text text text text
    text text text text text text
    text text text text text text
    text text text text text text
    text text text text text text
    text text text text text text
    Thanks.

    Have you tried using a panelHorizontal instead of a panelGroup?
    The components are automatically laid out horizontally and it has a Valign property that you can set to top.

  • [svn] 3216: Fix for MXMLG-228, a visibility problem with graphic elements.

    Revision: 3216
    Author: [email protected]
    Date: 2008-09-15 18:13:11 -0700 (Mon, 15 Sep 2008)
    Log Message:
    Fix for MXMLG-228, a visibility problem with graphic elements. This is a quick fix that may force extra display objects when toggling visibility. We should investigate alternate solutions if performance is a problem.
    Bugs: MXMLG-228
    Reviewer: Deepa
    QA: Please check for performance problems when toggling visibility of a large number of graphic elements.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/MXMLG-228
    http://bugs.adobe.com/jira/browse/MXMLG-228
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement .as

    Hello Antonio;
    After many, many test I discovered that the problem, at least in my case it is caused by the new ACR 4.5. Please read the Thread that I post under Camera Raw. I include the link below.
    I also open two Bug Reports about this, but as usual Adobe (and other Software Companies) will never take responsability for this, until one day they release a new version with "enhancements".
    PSE6 Organizer Crash with ACR 4.5 (Vista Only?)
    http://www.adobeforums.com/webx/.3bb6a869.59b60d3e

  • XML tag markers moved: Find and Replace causing problem in xml elements

    Hi All,
    I am doing find and replace using GREP. While using the expression like $1, $2 (Found Items) in the change to field it changes the placement of tag marker. If the found item is a part of two of more xml elements, I am getting a serious problem while replacing it. (ie. The xml tag markers are moved.)
    See the screen shot below, then you may get better idea. And help me to overcome this issue.
    This is just an example to show you what i'm trying to say, there are so many cases like this.
    Original text/ Before doing find replace
    After replacing
    Green4ever

    Hi Peter and John,
    but it seems to me that the example is looking for any space that
    follows a semi-colon and has two word characters following it, and
    repalce that with an em space. I think you could do the same using look
    behind and look ahead and not need to replace the found text.
    Yes you are right about the look behind and look ahead. I'd like to show some more examples to show what the actual problem is,
    Original/Before Replacing,
    (Consider there is another case here, instead of em-space some times normal word space will also be there)
    Using the Grep:
    Find What---------> ^(\d+\.(?:\d+)?)~m
    Change To------------->$1\t
    After Replace:
    Did I make any sense? Eventhough this will not make any changes in the layout, my requirement is to insert the tab out-side the tag marker not indise.
    Green4ever

Maybe you are looking for