How to remove the XML prologue in Oracle?

Our system works as follows:

1. place a piece of XML code in the database as a CLOB
2 database converts this value to XMLTYPE (stored as a CLOB (you can skip this, Marco * {;-)))))
3. a request then reads XML from the database and inserts it into another bit of XML
4. the application continues his treatment based on this new composite XML.

So far, the XML that is loaded into the database in step 1 (for various systems) has never contained a prologue. However, a new system came along and is now passing in a prologue. There are problems of application in step 3.

Apart from trying to get the new system do not spend in the prologue, is there a way to remove it of in Oracle?

I came up with two solutions are not elegant:

1. use XMLTABLE to retrieve the main root node (which might be different, depending on the system sent in the data and could change)
2 convert the prologue in a commentary, using REPLACE the product, before converting the CLOB in an XMLTYPE.

If I was forced to use one of the following methods, I would go with 2, but I really, really hope that there is a better way to do it.

Someone at - it any other suggestions, please?

PS. We are currently on 10.2.0.4 and are about to move to 11.2.0.3, but the solution is to work on both versions, for more fun and excitement!

It's error, the application gives: "error obtaining Exception of SAX for additional information: no processing instruction begins with"xml"" who says that the app dev is due to the presence of the prologue in the middle of xml, the app has build up.

So, basically, the app just "glue" XML in the middle of the other regardless of the structure? What kind of design is?
IMO, the application needs to be fixed, not the XML input.

A lot about how to add the prologue, nothing on how to remove it!

You can use the XMLQuery function to get the root element:

SQL> create table tmp_xml3 of xmltype
  2  xmltype store as basicfile clob;

Table created

SQL> insert into tmp_xml3 values (xmltype(''));

1 row inserted

SQL> select * from tmp_xml3;

SYS_NC_ROWINFO$
--------------------------------------------------------------------------------


SQL>
SQL> select xmlquery('*' passing object_value returning content)
  2  from tmp_xml3;

XMLQUERY('*'PASSINGOBJECT_VALU
--------------------------------------------------------------------------------

 

Published by: odie_63 on August 22, 2012 15:26

Tags: Database

Similar Questions

  • How to remove the menu by default oracle froms 6i

    How to remove the default window menu Oracle forms 6i.

    Amatu Allah Neveen Ebrahim wrote:

    As Salamu Asalam we Rahmatu Allah we Barakatu,.

    How are Hamid, you?

    The OP wondered about: form Menu of the window no.

    Best Regatds,

    Amatu Allah.

    Walikum As Salam O Rahmatillahi we Barakatu, sister Amatu Allah.

    Alhumdolilah. How about you?

    Average don't want to see window menu name?

    Oh, so that's that.

    1. quastion in THE HOW TO REMOVE MENU 'WINDOW' of ORACLE FORMS

    Hamid

  • How to remove the extra space of oracle database column

    How to remove the extra space of oracle database column. I would like to clean up the column in the database by deleting the extra space is entered by the dataentery people.

    When I run the query:
    SELECT
    ROWID, C.CODETABLE_ID, C.CODEVALUE_ID, C.DESCR, LENGTH (C.CODEVALUE_ID).
    C.OBSOLETE_DT, C.RECORDSOURCE, C.CREATED_DT,
    C.CREATEDBY, C.LASTUPDATED_DT, C.LASTUPDATEDBY
    OF CODEVALUE C
    Where LENGTH (C.CODEVALUE_ID) > 6

    the data type is varchar2 and I would get rid of the any extra blank space added to the column. in my case, if the length is greater than 6

    Hello

    user452051 wrote:
    Thanks for the reply. Why should I have this line?

    AND codevlaue_id! = TRIM (codevalue_id) - see note below
    ;

    I just changed my post when you posted this. The explanation is there now:

    Frank Kulash wrote:
    ...
    The condition "codevlaue_id!" = TRIM (codevalue_id)"does not change the results of everything, but it can make the most effective statement if there are lines where codevalue_id is on 6 characters long, but contains no additional space. It will prevent the triggers from firing and redo the data generated.

  • How to remove the xml with indesign file attributes.

    Dear friends,

    I need to remove attributes xml ('ul' element), I try to underside of coding and joint screenshot also, but I made a mistake. I'm not that I lack the coding below.

    Screen Shot 2016-02-22 at 12.57.49 PM.png

    My coding in the below.

    var elements = app.activeDocument.xmlElements[0].xmlAttributes.item["@new_class"] = "list-style-type:none";
        alert(elements.length);
        delete elements["@new_class"];
    

    Please suggest friends,

    Thank you in advance,

    Hello

    Try this...

    var doc = app.activeDocument;
    
    removeAttributes(doc,'ul','style','list-style-type:none');
    
    function removeAttributes(source,element,attributename,attributevalue){
        for (var i = 0; i < source.xmlElements.length; i++){
                try{
                    for(j=0; j		   
  • How to create the xml file in oracle plsql

    Hello

    I need the under xml (abc.xml) in unix Server out_directory file (the out_directory path: / u01/apps/xml /)

    Select sivauser, sivapwd from sivainformations;-it will be multiple records

    Select sivatelepone phone; - it will be multiple records

    Select xyzverion versionid; - it will be multiple records

    based on the above information, I need the sub file xml using oracle plsql procedure or a block

    example: suppose we record

    <? XML version = "1.0" encoding = "UTF-8"? >
    "< sivaService version ="2.0"xmlns ="http://www.siva.ab/siva/4.0/test">."
    < data language 'DEU' = >
    < sivauser action = "siva3" sivapwd = "siva123" > --i need to sivainformations table(sivauser,sivapwd) timeline
    phone < sivatelepone > < / sivatelepone >--i need to chronogram sivatelepone table (phone) based on the sivauser column
    < abcversion version = "1.0" >
    < Productinfo >
    versionID < xyzverion > < / xyzverion >--i need to xyzverion (versionid) based on the sivauser column table records
    < / Productinfo >
    < / abcversion >
    < / action >
    < / data >
    < / sivaService >


    example: assume that multiple records

    <? XML version = "1.0" encoding = "UTF-8"? >
    "< sivaService version ="2.0"xmlns ="http://www.siva.ab/siva/4.0/test>
    < data language 'DEU' = >
    < sivauser action = "siva3" sivapwd = "siva123" > --i need to sivainformations table(sivauser,sivapwd) timeline
    < sivatelepone > '345678' < / sivatelepone >--i need to chronogram sivatelepone table (phone) based on the sivauser column
    < abcversion version = "1.0" >
    < Productinfo >
    '1.1' < xyzverion > < / xyzverion >--i need to xyzverion (versionid) based on the sivauser column table records
    < / Productinfo >
    < / abcversion >
    < / action >

    < sivauser action = "siva4" sivapwd = "siva123" > --i need to sivainformations table(sivauser,sivapwd) timeline
    < sivatelepone > '123456' < / sivatelepone >--i need to chronogram sivatelepone table (phone) based on the sivauser column
    < abcversion version = "1.0" >
    < Productinfo >
    "1.2" < xyzverion > < / xyzverion >--i need to xyzverion (versionid) based on the sivauser column table records
    < / Productinfo >
    < / abcversion >
    < / action >
    < / data >
    < / sivaService >

    Please help me

    Thank you
    Siva

    I added a column ID to match the lines between the three tables.

    SQL> with sivainformations
      2  as
      3  (
      4     select 1 id, 'karthick' sivauser, 'karthick' sivapwd from dual union all
      5     select 2 id, 'ram', 'ram' from dual
      6  )
      7  , sivatelepone
      8  as
      9  (
     10     select 1 id, 1234567890 telepone from dual union all
     11     select 2 id, 1234512345 from dual
     12  )
     13  , versionid
     14  as
     15  (
     16     select 1 id, 1.1 versionid from dual union all
     17     select 2, 1.2 from dual
     18  )
     19  select xmlelement
     20         (
     21             "shivaService"
     22           , xmlattributes('2.0' as "version", 'http://www.siva.ab/siva/4.0/test' as "xmlns")
     23           , xmlelement
     24             (
     25                 "Data"
     26               , xmlattributes('DEU' as "language")
     27               , xmlagg
     28                 (
     29                     xmlelement
     30                     (
     31                          "Action"
     32                        , xmlattributes(s.sivauser as "sivauser", s.sivapwd as "sivapwd")
     33                        , xmlelement("shivatelepone", t.telepone)
     34                        , xmlelement
     35                          (
     36                              "abcversion"
     37                            , xmlattributes('1.0' as "version")
     38                            , xmlelement
     39                              (
     40                                   "ProductInfo"
     41                                 , xmlelement("xyzversion", v.versionid)
     42                              )
     43                          )
     44                      )
     45                 )
     46             )
     47         ).EXTRACT('*') xml_output
     48    from sivainformations s
     49    join sivatelepone t
     50      on s.id = t.id
     51    join versionid v
     52      on s.id = v.id;
    
    XML_OUTPUT
    -------------------------------------------------------------------------------------------------------------------
    
      
        
          1234567890
          
            
              1.1
            
          
        
        
          1234512345
          
            
              1.2
            
          
        
      
    
    
    SQL>
    
  • How to remove the logo from the Oracle of tableFirstTemplate?

    How to remove the logo from the Oracle of tableFirstTemplate?

    Dear aJohny!

    My worm jdeveloper is 12.1.3.0.0.

    For Jdeveloper code would be

    
    

    and the screen would be like this

    I think it's the correct process and the best answer to my question

    Concerning

  • How to remove the list item empty forms of oracle?

    Hello

    How to remove the list item EMPTY forms of oracle?

    I create two list items

    (1) basic

    (2) advanced

    But when I select list or display the runtime display form element 3 element EMPTY automatically, but I add what it shows I want to delete! How?

    He has named REQUIRED = NO item property

    If you set YES and then it does not show. but you must give an initial value.

    Hamid

  • How to remove the value of the XML attribute in the Indesign file with javascript

    Hi all

    How to remove the value of the XML attribute in the Indesign file.

    1.jpg

    What error is this?

    in any case try this as well (one another),

    var myDoc = app.activeDocument;
    attrDelete(myDoc);
    function attrDelete(elm)
    {
        for (var i = 0; i < elm.xmlElements.length; i++)
        {
            try{
                for(j=0; j
    

    Vandy

  • How to remove the warning 010212-BEA Weblogic 10.3

    Hello

    We migrated from 8.1 to 10.3.We are getting warnings during the server starts. To suppress the warning, I use the tag < disable WARNING > in the Weblogic ejb jar. I get the error message

    "* BEA-010212 is not an allowed value for the disable-WARNING element."


    Could someone please advise on how to remove the warning from BEA-010212


    Please find the jar of Weblogic XML for your reference.

    <? XML version = "1.0"? >

    < weblogic-ejb-jar xmlns = "http://www.bea.com/ns/weblogic/90" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd" > >

    < weblogic-company-bean >
    HouseKeepingName < ejb-name > < / ejb-name >
    < descriptor transaction >
    < trans-timeout-seconds > 36000 < / trans-timeout-seconds >
    < / descriptor transaction >

    < enable call-by-reference-> True < / enable-call-by-reference >

    < jndi name - > JSSSLHouseKeepingHome < / jndi-name >
    < / weblogic-company-bean >

    <>transaction-isolation
    TransactionReadCommitted < isolation-level > < / isolation level >
    < method >
    HouseKeepingName < ejb-name > < / ejb-name >
    < Method-intf > home < / method-intf >
    < method name >-* < / method name >
    < / method >

    < method >
    HouseKeepingName < ejb-name > < / ejb-name >
    Distance from < method-intf > < / method-intf >
    < method name >-* < / method name >
    < / method >
    < / transaction-isolation >

    < disable WARNING > BEA-010001 < / disable WARNING >
    < disable WARNING > BEA-010212 < / disable WARNING >

    < / weblogic-ejb-jar >

    Hello.

    http://download.Oracle.com/docs/CD/E13222_01/WLS/docs103/EJB/DDreference-ejb-jar.html#wp1113572 the only value disable warning are BEA-010001 | BEA-010054 | BEA-010200 | BEA-010202.

    It seems that you can not disable BEA-010212.

    Kind regards.

    Aurélien.

  • How to remove the variable created when using definedNamedWhereClauseParam()

    Hello

    My Jdev version 11.1.1.7.0.

    I'm Executive where clause programatically where I need to bind two bind parameters under certain conditions. Example, I have two bind variables X, Y.

    Here's the problem:

    Assume that the first time I'm setting one variable X, so I define X bind variable and execute the query.

    What second time I send only Y but not X. In this implementation of the scenario of VO throw an exception, given that the variable X is already created in the VO object and where clause does not have this setting.

    So how to remove variables created in the original Version all in definedNamedWhereClauseParam(). I need to erase what ever the previously created variable every time I execute method.

    I can make the similar functionlity using setWhereClauseParam (using literals). But I have a few technical restrictions for use.

    Could you please help me how to remove the variable before vo using definedNamedWhereClauseParam.

    Caused by: java.sql.SQLException: try to set a parameter name that does not intervene in the SQL: itemNumber
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15969)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
    at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName (unknown Source)
    at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
    at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
    at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22742)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1298)
    ... more than 96



    Thank you.

    -Diette.

    Published by: Vidya Diette on February 28, 2013 08:43

    Hello

    You need access to the variable Manager. Order of reading in the JavaDocs:

    http://docs.Oracle.com/CD/E28389_01/apirefs.1111/e10653/Oracle/JBO/ViewObject.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManagerOwnerBase.html#getVariableManager%28%29--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableValueManager.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManager.html#removeVariable%28java.lang.String%29

    Frank

  • How to remove the notification validation

    Hello

    I have all my commits the value Inline with field only, but I still get all the validation messages in the notification section and also in the field?

    How to remove the validation section notification messages?

    Thank you very much

    I have

    Probably yes. In this case you have double.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to remove the Tables of HFM Application in SQL

    Hi gurus

    1. how to remove the HFM Application Tables in SQL?
    Its manual removal but each application having 120-150 tables? How to do this in one fell swoop?

    I deleted some applications using the workspace / shared services, but still its display under HFM under the Tables of SQL Server.

    Please help me

    concerning
    Smilee

    Hi Smilee,

    1. If the application opens in the web management interface, go to Taskflows management module and make sure that no taskflows exist yet for this application. Remove any existing taskflows.

    2. If demand exists in Shared Services, right-click on the demand for Shared Services and try to remove the application from here

    3. stop Hyperion Shared Services and all the Windows of financial management processes and backups of the relational database of the two patterns.

    4. check the relational database of Hyperion Shared Services repository, in the "ces_apps" table and make sure that there are no lines containing the appname "EXAMPLE." If the line still exists you should enlist the help of Oracle Global Support software to clean Hyperion Shared Services before proceeding.

    5. it is possible to remove all content removed from the relational database of financial management application. Must be very careful when handling manually tables database that permanent damage can be done at the application and other applications if the wrong content is removed.

    (a) first remove all tables, indexes, sequences, and the package objects that begin with the name of the application
    (b) remove all tables starting HSV_appname_xxxxxx
    (c) remove all rows in tables referring to demand HSX_CLUSTER_xxxxx.
    (d) delete all the HSV_ACTIVITY_KILL_USERS, HSV_ACTIVITY_NO_ACCESS, HSV_ACTIVITY_SESSIONS and HSV_ACTIVITY_USERS and HSV_USERS_ON_SYSTEM lines that refer to the name of the application.
    (d) remove the line containing the name of the application from the HSX_DATASOURCES table.

    6. the next time that all Hyperion services are restarted, the application must be removed safely from Windows client.

    You can contact your DBA to write a query on how to remove it.

    Hope this helps,

    Thank you
    Charles Babu J

  • How to remove the file from the client machine

    Hi all
    We use the database: oracle: 10 g,.
    and forms/States 10g (developer suite 10g - 10.1.2.2).

    can someone help me how to remove the file from the client computer in the location specified using webutil or everything
    (I tried with webutil_host & client_host but this only works for the application server)
    Thank you.

    Hello

    Checkbox not tested.

    PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
    IS
    
    --------------------------------------------------------------------------------
    -- Open a stored document --
    
    --------------------------------------------------------------------------------
    LC$Cmd Varchar2(1280) ;
    LC$Nom Varchar2(1000) ;
    LC$Fic Varchar2(1280);
    LC$Path Varchar2(1280);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
    V_FICHERO VARCHAR2(500);
    COMILLA VARCHAR2(4) := '''';
    BOTON NUMBER;
    MODO VARCHAR2(50);
    URL VARCHAR2(500);
    
    Begin
    
    V_FICHERO := V_ID_DOC;
    
    LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
    LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
    --LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
    LC$Path := 'C:';
    LC$Fic := LC$Path || LC$Sep || LC$Nom ;
    
    If Not webutil_file_transfer.DB_To_Client
    (
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    
    Raise Form_trigger_Failure ;
    
    End if ;
    
    LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
    Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
    LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
    If LN$But 0 Then
    Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
    Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
    LN$But := Show_Alert( 'ALER_STOP_1' ) ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Raise Form_Trigger_Failure ;
    End if ;
    
    If Not webutil_file_transfer.Client_To_DB
    (
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    NULL;
    Else
    Commit ;
    End if ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    
    Exception
    When Form_Trigger_Failure Then
    Raise ;
    End ;
    

    Sarah

  • How to remove the extension AM and substitution of the server

    Hello

    Can someone tell me please how to remove the possibility of existing substitution and expansion of the AM of the server.

    Concerning
    Swati

    Swati,

    You can remove the substitution using the API jdr_utils.deletedocument ('').
    The path will be as "oracle/apps/ap/xx/customizations/0/server /...» »

    Kind regards
    GYAN

    Published by: Gyan on June 3, 2011 19:28

  • How to remove the translations

    Hi all

    We have two ways to remove customizations
    (1) using the Funcational administrator-> customization
    the query page and manage personalization and remove the customization.

    (2) using the script.
    Start
    jdr_utils.deleteDocument('/Oracle/Apps/PON/award/completion/WebUI/customizations/site/0/ponCompleteAward2PG ');
    end;

    How to remove the translations.
    One way is still change target language text for English and import the file .xlf.
    Is there another way?

    With respect,
    Kali.
    OSSI.

    Hi Kali

    Please check if this link helps out. It gives a method to remove translations.

    http://ramaatoracleapps.blogspot.com/2010/03/migrate-OA-framework-personalizations.html

    Thank you
    AJ

Maybe you are looking for

  • cannot organize bookmarks

    I recently updated my firefox browser to the latest version on 06/19/11 and I want to export my bookmarks in html format to save them. When I went to the bookmarks menu option "organize bookmarks" is not available. Is not that it is gray, it is simpl

  • Satellite L300 - how to activate the RW function after installing xp?

    After my laptop was repaired with a new hard drive, I installed xp instead of vista.Now I can use the dvd rom for watching movies and install programs, but it is not accessible to any blank discs.The error window comes out whenever I have insert the

  • divided time base

    In the simultaneous measurement with AI and AO, I used SMU-6124, that supports the time base of 80 MHz clock. I was told that I can use 80 M/n (integer) as a sampling in SMU-6124. In order to obtain n is integer, I limited my settings for 2 to 5 comm

  • One touch of the CSJ has received

    Hello This morning, I applied signature keys for my application, Native of the Playbook by following this URL https://bdsc.webapps.blackberry.com/native/beta/signingkey A few hours later, I received an email with attatched key COMINCO SYC.

  • I can't cancel my subscription

    I have try 3 days - I start a conversation, but no one answer me! I have two subscription (why it happened & &) and photoshop does not work! I can't work! creating cloud not see my paid subscription, but I had already paid! Help, please!