Limit on XML Tag Name's under PL/SQL?

If I run the following SQL against my database I don't get any errors:-
SQL> SELECT XMLAGG(
  2    XMLELEMENT("courtresultextractstructure"
  3   ,CASE
  4      WHEN courtresultotheroffen IS NULL THEN NULL
  5      ELSE XMLELEMENT("courtresultotheroffencesticquantity", courtresultotheroffen)
  6    END
  7  )) as "courtresultextractstr"
  8  FROM courtresultextractstr;
courtresultextractstr
----------------------------------------------------------------------------------------But if I embed the query within a function I get:-
SQL> CREATE FUNCTION a_courtresultextracts ( p_id NUMBER ) RETURN XMLTYPE IS
  2    v_xml   XMLTYPE;
  3  BEGIN
  4  SELECT XMLAGG(
  5    XMLELEMENT("courtresultextractstructure"
  6   ,CASE
  7      WHEN courtresultotheroffen IS NULL THEN NULL
  8      ELSE XMLELEMENT("courtresultotheroffencesticquantity", courtresultotheroffen)
  9    END
10  )) as "courtresultextractstr"
11  INTO v_xml
12  FROM courtresultextractstr
13  WHERE ref_id_courtresultextractstr=p_id;
14  RETURN(v_xml);
15  END a_courtresultextracts;
16  /
Warning: Function created with compilation errors.
SQL> sho err
Errors for FUNCTION A_COURTRESULTEXTRACTS:
LINE/COL ERROR
8/21     PLS-00114: identifier 'courtresultotheroffencesticqua' too long
SQL>Please tell me there isn't a 30 character limit on the size of the XML tags that are allowed when you perform the queries through PL/SQL.....
Any ideas anyone?

I've now tracked down this as a bug on Metalink (3461263)
It's fixed in 10g Release 2 apparently, and I'm using 10g Release 1 at the moment.
Time to upgrade methinks....

Similar Messages

  • Character '$' is not allowed in an XML tag name. /ERROR

    Hi,
    I was testing cli command java OracleXML getXML ....
    getting following error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character '$' is not allowed in an XML tag name.</ERROR>
    This was because the database column name included $ characters.
    Question 1: Is it possible use getXML/putXML cli operations for tables containig these $ columns
    and how?
    Now I found the method setSQLToXMLNameEscaping(true) and tried the same query using the modified
    sample java code of XSU documentation. This time I got error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: You are using an old version of the gss library; thus, sql-xml name escaping is not supported.</ERROR>
    Question 2: What is this gss library and is there up-to-date version available - and will it solve my
    $ problem?
    Thanks,
    Olavi

    Hi,
    I was testing cli command java OracleXML getXML ....
    getting following error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character '$' is not allowed in an XML tag name.</ERROR>
    This was because the database column name included $ characters.
    Question 1: Is it possible use getXML/putXML cli operations for tables containig these $ columns
    and how?Please use alias in your SQL query for the column with $, like
    select sys$rowno_info as rowinfo..OK for getXML but how to do this with putXML?
    Now I found the method setSQLToXMLNameEscaping(true) and tried the same query using the modified
    sample java code of XSU documentation. This time I got error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: You are using an old version of the gss library; thus, sql-xml name escaping is not supported.</ERROR>
    Question 2: What is this gss library and is there up-to-date version available - and will it solve my
    $ problem?gss libs is ithe nls_charset12.jar located in jdbc/lib.
    Olavi
    I added nls_charset12.jar dated july 2002 into my classpath without
    success?
    Olavi

  • When I start Firefox, I get this alert message "[JavaScript Application] XML tag name mismatch (expected META)". What is this message?

    My firefox updated today automatically, and then when it started up, it displayed this alert message:
    "[JavaScript Application] XML tag name mismatch (expected META)"
    I can press OK and my browser then works just fine and I can go to websites and what-not. I have not run across any problems or anything. I am just wondering what this alert message means and if I should fix it?
    I tried closing the browser and pulling it back up, and the same message was displayed. Also, if I open a new window the same message is displayed. But it is only displayed right when I open the browser, and does not show up anytime while using the browser.

    If you click the Home button from another page, does the error repeat? If so, what is your home page?
    When Firefox starts, it fires up a lot of add-ons. A standard diagnostic for add-on issues is to try Firefox's Safe Mode.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [[Backing up your information]]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in Firefox's Safe Mode ([[Safe Mode]]) using
    Help > Restart with Add-ons Disabled
    In the Safe Mode dialog, do not check any boxes, just click "Continue in Safe Mode."
    Do you still get the message? If not, one of your add-ons might not be fully compatible with Firefox 14 or might need an update.

  • How to get the XML TAG name itself instead of TAG value

    Hi All,
    I have a question here
    I want to retrieve the XML tag from a XML file instead of its value.
    Example:
    <item>Colgate</item>
    Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
    How to do that...?
    Thanks
    -Praveen

    You can do this with an axes XPatch expression:
    child::node()/name()
    For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
    HTH,
    Bas

  • Non-latin elements (=XML tag names) processing

    Hello there,
    How could I process XML with non-latin tag names? As far as I know, XI itself cannot map or interact with these XML elements nor design these names in IB.
    But I have to work with it and what should I do? The only way for me is to write EJB-module for adapters which could remap these names into latin ones using simple mapping table and XSLT.
    PS There are no problems with Unicoded content, but BIG deal with naming convention

    Just a remark, surprisingly for me I can use non-latinized (russian for example) XSD as an external definition and create message type based on it.
    And I can use russian elements in graphical mapping too but not in own XI elements.
    So this is much more interface problem, not basis one.

  • Autogenerate XML tag names from other style palettes

    Map Styles to Tags works great when you already have a bunch of tags named identically to the other styles you want to map. Today, however,  I had to manually create and type in tag names to match about 25 paragraph styles. Ick!
    It would be really neat if you could select a bunch of styles in the Para or character Styles palettes and have a "Create Matching Tags" command that would automatically add tags matching those style names to your Tags list. No muss, no fuss, no typos.
    Thanks! The XML fuctions are mostly extremely cool!

    FYI, I am using
    Win Xp-SP2, CS5 7.0.3

  • XML tag name array

    hi, i want to get an array of tag names
    lets say i have this xml
    <root>
    <bookmeta>
    bunch of xml tags i want to get the name of inside an array
    </boometa>
    </root>
    with this i get an array of xml tag objects
    var myDoc = app.activeDocument;
    var xml = myDoc.xmlElements[0];
    var myNodes = xml.evaluateXPathExpression('//bookmeta/child::node()');
    alert(myNodes);
    if i do .markupTag.name returns undefined,.. Help please!

    done, i created this function and works fine
    function toArray(objects){
                                                var i = objects.length; var array = [];
                                                while(i--){
                                                        array.push(objects[i].markupTag.name);
                                                return array;

  • Document contains too many nodes error when extracting xml tag name

    I Have a large xml file in which the tag contains ~: as the value.
    Now I am trying to extract all the tags which have ~: as the value and store that column using the following query and insert into a table.
    insert into space_md select distinct xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
    from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
    where instr(extract(value(x),'/').getstringval(),'~:') > 1;
    The xml file was generated using dbms_xmlgen.getxml. Table has 48 columns and around 4000 rows.
    My above insert query gave me an error of 31186 too many nodes error.
    I am using oracle version 10.2.0.3.
    Following are the set of commands I ran....
    SQL> insert into gt_xmltype_tab(xmlfile1)
    values(XMLType(bfilename('BKUP_RES','QC.xml'),nls_charset_id('AL32UTF8'))); 2
    1 row created.
    SQL> SQL>
    SQL> insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
    2 from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
    3 where instr(extract(value(x),'/').getstringval(),'~:') > 1;
    insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
    ERROR at line 1:
    ORA-31186: Document contains too many nodes
    Is there a better way of extracting the xml tag element name based on the xmltag content?
    There is one other table which has 172 columns but only 100 rows so it doesnt create any problem on that table.
    But this QC table has less columns but many many rows...
    Any suggestions

    There is a requiremnent of taking centain type of data backup and restore it.
    It was implemented on flat file approach which was giving errors.
    So it was implemented using XML approach.
    Read data, store in xml file and read from xml file and load it into table.
    Further, found that dbms_xmlstore is not able to handle tag only with whitespace
    and tried to use the loading xml file into xmltype table column and extract data.
    XMLTYPE column also has same problem of ignoring whitespace when used with extractvalue functions.
    So for the workaround I update xmlfile having only one more more whitespace in the tag to have ~: character once.
    After restoring data from xml to table I would run update qeury to update ~: to " ".
    Now instead of running blind update for all the tables and all the columns from ~: to " " I thouhgt whyy not create a xml file of tag having ~:
    along with its tablename.
    and thats where I found the problem of too many nodes...
    THe insert query you saw is populating table for table_name and column_name with tag having only ~: in it.
    I hope this gives you the fair idea of stuff I am doing.

  • XML Tag Name too long, won't run from a procedure

    I have a select statement that creates an xml file using the xmlelement syntax. When I run the select statement on its own it runs fine and the xml file is generated with no errors. I'm building a procedure that does a bunch of stuff, with the end product being the generated xml file. Everything in the procedure works great, until I add the xmlelement select statement. When I try to compile it I get an error message that one of the identifiers is too long (it is 40 characters). Is there something special I need to do to get this to run within a procedure with the given tag names? I can't change the names as they are set by another department.
    Thanks.

    Sorry about that, Mondays are painful...
    I'm not sure if you want the whole procedure, it is quite long, but here is the xml part. I am using TOAD, and when I right click and Compile I receive this error: PLS-00114: identifier 'PostalCodeOfPatientsCurrentResidenceKnownFlag FROM Admissions' too long
    The part that confuses me is why does it run fine when I run it on it's own, I get the expected XML file, but when I try to run it from a procedure it fails.
    SELECT sys_xmlgen(XMLELEMENT("MHR", XMLELEMENT("Control",      XMLELEMENT("DeliverySiteInstitutionNumber",a.institution_number),
                                                           XMLELEMENT("CreationTimestamp",sysdate),
                                                                               XMLELEMENT("DSSVersion",'NotSure'),
                                                                               XMLELEMENT("ResubmissionFlag",'1'),
                                                                               XMLELEMENT("SubmissionYear",a.REPORT_YR_AND_MNTH),
                                                                               XMLELEMENT("SubmissionPeriod",a.SUBMISSION_PERIOD)),
         XMLELEMENT("Stakeholders",XMLELEMENT("Stakeholder", XMLELEMENT("SubmissionType",'A'),
                                                                                                                  XMLELEMENT("ULI", a.ULI),
                                                                                              XMLELEMENT("Gender",'Male/Female/Unknown'),
                                                                     XMLELEMENT("BirthDate", XMLATTRIBUTES(a.BIRTH_DATE_TYPE,a.BIRTH_DATE)),
                                                                                                                  XMLELEMENT("ResidenceInformation",XMLELEMENT("ProvinceOfPatientsResidence",a.PROVINCE_OF_RESIDENCE),
                                                                                                                                      XMLELEMENT("PostalCodeOfPatientsCurrentResidenceKnownFlag",a.POSTALCODE_KNOWN_FLAG),
                                                                                                                                                          XMLELEMENT("PostalCodeOfPatientsCurrentResidence",a.POSTALCODE))
                        )).getClobVal() AS "result"
    FROM Admissions a
    Edited by: user11293056 on Jun 22, 2009 12:54 PM

  • [CS5 JS] Problem in Applying character styles xml tag names

    Hi,
    e.g. 1
    <italic>This is a italic text with <sup>superscript value</sup></italic>
    e.g.2
    <sup>This is a superscript text with <bold>Bold superscript</bold></sup>
    <italic>  mapped to character style "italic" and
    <sup> mapped to character style "sup"
    In my java script I already mapped the xml tags to specific character styles. In some of the cases (see e.g.1 and e.g.2) I need to map it to other character styles.
    In e.g.1 I need to apply a new character styles "italicSup" for the text "superscript value" same way
    In e.g.2 I need to apply a new character styles "BoldSup" for the text "Bold superscript".
    Can any know how to do this?
    Green4ever

    FYI, I am using
    Win Xp-SP2, CS5 7.0.3

  • How to get xml tag name?

    Hi all
    I've selected some texts and I want to get its xml element name not root element. I've done this
    InterfacePtr<IXMLReferenceData> xmlRefData(Utils<IXMLUtils>()->QueryXMLReferenceData(textModel));
    and I get only the document's root element name.
    Any suggessions please.

    Hello Dirk
    I've looked there. But I dont understand which one one will satisfy my need. There are "QueryDocElement" and "QueryRootElement" and their definitions say that it will return root element of doc/database.
    please i need ur suggessions further.
    Thanks
    THAMIL

  • Way to find XML Tag name from RDF

    Hi
    Is there some way by which simply looking at fields in RDF, we can find out what XML Tag will be used by the data shown by it. Actually I am using a RDF's output for my XML report. Finding XML tag for a particular field is difficult job.
    Thanks for your help.
    Regards
    Varun

    Got It :-) Just check the data source of field and that is the XML tag. Thanks

  • Finding xml tags name

    Hello,
    I use: Node root=doc.getDocumentElement();
    to find root of XML and NodeList a=root.getChildNodes(); to find all his children. how can I find tag's name (age)?
    <age> 22</age>

    Well, in a, you have a NodeList. That list contains a lot of nodes. If age is the first (and/or only) node in that list, you probably can take a.item(0).getNodeName();
    Read more at http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Node.html and http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/NodeList.html

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

  • Xml tag name

    Hello
    i have a query that extracts the xml value of a xml column in a table
    select extractvalue(xmlMessage, 'a/b/c') from table
    i'd like to know if there is a way to get the name of the node..
    i want to get: 'c', value
    thanks
    Rose

    Hi,
    try this
    SQL> with t as (
      2        select xmltype('<a><b>
      3                          <c attr="oracle">Hello, World!</c>
      4                          <dd attr="oracle">Second Hello, World!</dd>
      5                         </b>
      6                          <eee attr="oracle">Third Hello, World!</eee>
      7                        </a>') xmlmessage
      8        from dual
      9      )
    10  select
    11     x.column_value.getrootelement() name
    12    ,extractValue(value(x),'.') val
    13  from t,table(xmlsequence(extract(xmlmessage,'//*[@attr="oracle"]'))) x
    14  /
    NAME  VAL                                                                      
    c     Hello, World!                                                            
    dd    Second Hello, World!                                                     
    eee   Third Hello, World!                                                      
    SQL> spool off;
    could you post your xml and the query where you got ORA-19025

Maybe you are looking for

  • Have to regularly restart DHCP Client - HP Pavilion 500-205 DT - Windows 7

    HP Pavilion 500-205 DT - Windows 7 Home Premium 64-bit SP1 Realtek PCIe GBE Family Controller - Driver 7.67.1226.2012 Bought 3 identical machines for our childcare center. Set them up the same. All work fine except ONE of them becomes inaccessible pe

  • How to update the screen in realtime?

    Hey, i am realy new in Indesign scripting i want to do a simple client script- the script should receive data and write it to a textbox (or do sth else with it). Everything works fine the only problem is: I dont know how to make this in realtime- for

  • Use of indexes

    Hello If I have a table that I'm adding a set of rows to that has an index on a couple of columns, and then within the same transaction re-query the table, can oracle use the index for the uncommited rows? I can see that there are reasons why it woul

  • Gateway crashed after debug command - how to recover

    Hi - I was troubleshooting an issue out of hours and the voice gateway I was working on crashed after using a debug command Whats the best way to recover the gateway? I'm unable to ping it now - do I need someone to reboot it? Once it comes back up w

  • Error Code (-50) when downloading from iTunes

    Im curious to know if anyone else has received this type of error message before? I have never had any problems downloading season pass stuff from iTunes so this is the first time I've ever seen this.  Ive double and triple checked all of my connecti