DeleteXml() causing xml data format error in database

Hi, guys,
  I'm using the oracle  xml db 11g in my website application. Last week I found that using the deletexml() to delete a node in the xml may cause a terrible problem that the rest data in the database had wrong xml format. I wonder is it a bug when using binary xml storage.
  My xml data is describe below,
<root>
     <nodes>
          <node id="1">
               <name>John</name>
               <age>16</age>
               <hobby>football</hobby>
          </node>
          <node id="2">
               <name>Alex</name>
               <age>22</age>
               <hobby>table tenisl</hobby>
         </node>
     <nodes>
</root>
  I using deletexml() to delete just a node once time,
"update projects set object_value=deletexml(object_value, '/root/nodes/node[@id="1"]')"
Usually it successes and the rest data is as excepted, but sometime, I find that after deleting a node, any query in the database except "select * from projects" gets null. And the rest data has wrong format like below,
<root>
     <nodes>
          <node id="1">
               <name>John</name>
               <age>/hobby>
          </node>
          <node id="2">
               <name>Alex</name>
               <age>22</age>
               <hobby>table tenisl</hobby>
         </node>
     <nodes>
</root>
Just one format error causes the whole xml data valueless, but it seems that in most time the deletexml() works well, does anyone knows what happens?
Thanks a lot.

KnightOfBlueArmor wrote:
The better idea is to use XMLPatch() if you can.
XMLPatch?
Do you use it yourself on a regular basis?
Personally, I find it fun to use but the performance doesn't match my expectations (no piecewise update/streaming eval AFAIK).
Message was edited by: odie_63

Similar Messages

  • CPM error: Graphic: Invalid XML data format

    Hi guru's
    When I execute a cockpit the system shows the error: "Graphic: Invalid XML data format"
    We have BI 7.0 and SEM-BW 600 SAPKGS6014
    What can I do.
    Thanks
    Jose

    Hi guru's
    I still with the problem, I found a  Note 768114 - Message 'Invalid XML format' if chart should be displayed. the note decribe my proble exactly. But the correction in the note are only until version 400 of SEM any our company is in 600.
    With this clue, maybe you can help me.
    Jose

  • Date format error in LOV with dates. Jdeveloper 11.1.1.0.1

    We're facing a silly problem, which no one else seems to have... ?
    When creating a LOV on a date column (eg hr.employees.hiredate) populated from another DataSource (eg. hr.job_history.startDate), the Application Module is working fine when tested.
    Building a jspx on top of the Datacontrol picks up the LOV defined and creates a SelectOneChoice for hiredate. But for what ever value you select, it will complain about wrong date format "Error: The date is not in the correct format".
    I can see, that the "real" value selected from the SelectOneChoice is an index-value, and the "format checking code" builtin to Jdeveloper can't figure out how to get the datevalue for the selected index.
    Surely it must be me, who can't see the forest for the trees?
    Thanks in advance :)

    Its a bit tricky - but its doable... We have to abandon the "Oracle LOV model" to make it work.
    Surely its must be some kind of bug in the Oracle LOV model? ?
    The way to do it is like:
    In Model project:
    M1: Remove List Of Value binding from Model layer (Business components). Both entity and view if declared both.
    M2: Create a view for the "date list" - ie the datasource for possible values in list.
    M3: Secure that format mask (hint) for all dates involved are the same.
    In View project:
    V1: Drop datacontrol on jspx as normal input dates.
    V2:Go to bindings for the page, and add (+) a new TABLE binding (And from here an iterator) to the view containing the list.
    Modify the input dates you want to be list:
    V3: Select the input date and rightclick and choose "convert"
    V4: Select a SelectOneChoice component
    V5: Pick the right column (tree) value to show in the SelectOneChoice componet.
    Switch to source view:
    V6: Drop a ForEach item from the component Palette (ADF Faces -> operations) on the SelectOneChoice (easiest to drop in structure windows)
    V7: Drop a Select Item from the component Palette (ADF Faces -> common components) on the SelectOneChoice (easiest to drop in structure window).
    Modify the source:
    V8: Insert "items" and "var" attributes in ForEach like this: +"items="#{bindings.[[Here goes the name of the New TableBinding component you made in Step V2]].rangeSet}" var="li"+
    V9: Insert "value" attribute and change "label" attribute to reference your new list variable "li" like this: +label="#{li.[[here goes the name of the new TableBinding Component attribute (columnname) you made in Step V2]]}" value="#{li.Firstofmonth}"+
    V10: Insert/edit any converters/validators needed for input validation.
    Done....
    You should end up with a SelectOnChoice definition (in your jspx file) something like this one:
    +<af:selectOneChoice value="#{row.bindings.ActiveFrom.inputValue}"+
    +label="#{row.bindings.ActiveFrom.label}"+
    +required="#{bindings.McAccountsView1.hints.ActiveFrom.mandatory}"+
    +shortDesc="#{bindings.McAccountsView1.hints.ActiveFrom.tooltip}">+
    +<af:forEach items="#{bindings.FirstOfMonth1.rangeSet}" var="li">+
    +<af:selectItem label="#{li.Firstofmonth}" value="#{li.Firstofmonth}" />+
    +</af:forEach>+
    +<af:convertDateTime pattern="dd-MM-yyyy"+
    +messageDetailConvertDate="Its not possible to convert the date in {0} since its value {1} dont conform to the pattern {2}"+
    +secondaryPattern="yyyy-MM-dd"/>+
    +</af:selectOneChoice>+
    And a binding definition (in your pagedef file) something like this one:
    +<?xml version="1.0" encoding="UTF-8" ?>+
    +<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"+
    +version="11.1.1.52.5" id="McAccounts01PageDef"+
    +Package="solution">+
    +<parameters/>+
    +<executables>+
    +<iterator Binds="McAccountsView1" RangeSize="25"+
    +DataControl="dateLovEmailDataControl"+
    +id="McAccountsView1Iterator" ChangeEventPolicy="ppr"/>+
    +<searchRegion Binds="McAccountsView1Iterator" Criteria=""+
    +Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"+
    +id="McAccountsView1Query"/>+
    +<iterator id="FirstOfMonth1Iterator" RangeSize="10" Binds="FirstOfMonth1"+
    +DataControl="dateLovEmailDataControl"/>+
    +</executables>+
    +<bindings>+
    +<tree IterBinding="McAccountsView1Iterator" id="McAccountsView1">+
    +<nodeDefinition DefName="dk.hammerJakobsen.Jdev.sample.model.McAccountsView">+
    +<AttrNames>+
    +<Item Value="EmployeeName"/>+
    +<Item Value="Id"/>+
    +<Item Value="BankAccount"/>+
    +<Item Value="StellarAccount"/>+
    +<Item Value="ActiveFrom"/>+
    +<Item Value="ActiveTo"/>+
    +</AttrNames>+
    +</nodeDefinition>+
    +</tree>+
    +<action IterBinding="McAccountsView1Iterator" id="CreateInsert"+
    +RequiresUpdateModel="true" Action="createInsertRow"/>+
    +<action IterBinding="McAccountsView1Iterator" id="Delete"+
    +RequiresUpdateModel="false" Action="removeCurrentRow"/>+
    +<action IterBinding="McAccountsView1Iterator" id="First"+
    +RequiresUpdateModel="true" Action="first"/>+
    +<action IterBinding="McAccountsView1Iterator" id="Last"+
    +RequiresUpdateModel="true" Action="last"/>+
    +<action IterBinding="McAccountsView1Iterator" id="Find"+
    +RequiresUpdateModel="true" Action="iteratorFind"/>+
    +<action IterBinding="McAccountsView1Iterator" id="Execute"+
    +RequiresUpdateModel="true" Action="iteratorExecute"/>+
    +<action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"+
    +DataControl="dateLovEmailDataControl"/>+
    +<action id="Rollback" RequiresUpdateModel="false"+
    +Action="rollbackTransaction" DataControl="dateLovEmailDataControl"/>+
    +<table IterBinding="FirstOfMonth1Iterator" id="FirstOfMonth1">+
    +<AttrNames>+
    +<Item Value="Firstofmonth"/>+
    +</AttrNames>+
    +</table>+
    +</bindings>+
    +</pageDefinition>+
    this approach works... But... Its important to remember that the "two" values are different now. The value in the row, and the possible value from the list. When you select a new value for the row from the list, you'll have to commit the value before its in the row - even seen from Faces. You can't reference the value in the base table in a validator before the row is committed.
    For the same reason I'll advise, that you only use the model in Single row view, since its can behave a bit funny in table views, where there's a lot of PPR.

  • Bex Analyser : Date Format error.

    Hi All,
    We are facing date format error, while running the query in Bex analyzer.
    We have one column in report i.e Net Payment Date, so when we run the query in analyzer the single date like "5-6-2010 is getting swapped like 6-5-10 & year also showing two digits i.e instead of 2010 it shows 10" & date like "12-09-2010 is coming perfectly."
    Means the date which is in single digit we are facing this problem like 1 to 9 & the dates which are 10 & above showing perfectly.
    In RSRT the query showing proper result, so i don't think it's BI problem.
    The regional setting is DD-MM-YYYY & Date separator is '-' & we don't want to change this format.
    Is there any SAP note or any solution for this..??
    All the replays are gr8ly appreciated.
    Thanks,
    Santosh

    Hi Santosh,
    how about web display? is it ok? for me it seems more an Excel problem, so maybe you should check if there is special formatingin this.
    Regards,
    Anass

  • Home Page Date Format ERROR ...

    I installed language support on my Portal 3.0.9.8 with 3 different languages: us, i=italian, f
    but when i use the "i" language there are many problems with format date ...
    in the Portal Home Page i have a message like "date format not valid"
    and i have problems in the creation of the content area's items with the publish date.
    Any one have an idea ???

    HI All,
    I have check my own data date format.
    But when i tried to activate the cycle count under
    Menu path: 
    Materials Management > Inventory Management and Physical Inventory>Physical Inventory> Cycle Counting
    I will not put any date on it, that's why its weird that i get an date format error.
    Where this error came from?
    Thanks..

  • Loading xml data to a oracle database problem in style sheet

    Hi,
    I Have one small Problem While loading xml data to a oracle database.
    In the XML i have the Columns and Data Like this.
    <Data>
    <TRAN>
    <Type_Trs>A</Type_Trs>
    <T1>2</T1>
    <T2>3</T2>
    </TRAN>
    <TRAN>
    <Type_Trs>B</Type_Trs>
    <T1>2</T1>
    <T2>3</T2>
    </TRAN>
    </Data>
    I have TRAN Table having Field Like this.
    TRAN(Type_Trs,T1,F)
    Note:- The XML Column T2 is Not matching with TRAN Table Column F
    I want to fetch T2 data into F column.
    When I am fetching the xml data into oracle table only
    one row is fetching.
    Can You help me
    To load the the all the record of XML data into the Oracle Table
    What will be my XLS Style Sheet File Please
    suggest me.
    Regards
    MBR
    Thnks in Advance

    Hi MBR
    You would be better posting your question to the general XML forums:
    http://forums.oracle.com/forums/category.jspa?categoryID=51
    This is purely for XML/BI Publisher where we get the data back out of the db :o)
    Tim

  • Date Format Error During Cycle Count Activation

    Hi MM Guru's,
    Could you kindly help me with regards to my problem?
    I was trying to activate the cycle count for the newly plant i created under new company code.
    But im getting a date format error?
    Anyone who could help me regarding this?
    Thank you in advance.

    HI All,
    I have check my own data date format.
    But when i tried to activate the cycle count under
    Menu path: 
    Materials Management > Inventory Management and Physical Inventory>Physical Inventory> Cycle Counting
    I will not put any date on it, that's why its weird that i get an date format error.
    Where this error came from?
    Thanks..

  • Mailman - bounced "data format error" - Mailbox does not exist

    Hi gurus,
    All my mailing lists works great, except one of then...
    Its said: a lot of messages like this, several times:
    Mar 6 07:08:33 rossellimac postfix/pipe[2931]: 3F55D15F892: to=<[email protected]>, orig_to=<[email protected]>, relay=cyrus, delay=0.11, delays=0.04/0/0/0.07, dsn=5.6.0, status=bounced (data format error. Command output: alejandro: Mailbox does not exist )
    Also this error:
    3/6/09 8:18:20 AM lmtpunix[4844] AOD: user opts: get attributes for user: alejandro failed with error: -14479
    3/6/09 8:18:20 AM lmtpunix[4844] warning: unable to post message for user: alejandro, mail is not enabled for this user
    The computers halt for a minute... when I send an email to this list (general@) where "alejandro is a user"
    Please, some advice... I surf the web... and not always produce error...
    Thanks in advance.
    Message was edited by: alopezruiz

    ok

  • ODI XML data server error while creating External databse tables.

    Hi,
    i am trying to create External database tables using XML data server.
    i am getting the following error,i have done this same thing for small xml files before.
    Java.sql.SQLException: ORA-00904: : invalid identifier
         at com.sunopsis.jdbc.driver.xml.bz.execute(bz.java)
         at com.sunopsis.jdbc.driver.xml.ca.execute(ca.java)
         at com.sunopsis.xmlfifth.b.u.a(u.java)
         at com.sunopsis.xmlfifth.b.bj.a(bj.java)
         at com.sunopsis.xmlfifth.b.bj.a(bj.java)
         at com.sunopsis.jdbc.driver.xml.u.a(u.java)
         at com.sunopsis.jdbc.driver.xml.u.g(u.java)
    Thanks,
    RK

    RK,
    With no details of how you configured the XML server, what were the parameters used in the configuration for using external database, etc, I dont know how much can someone help you.
    This is an Oracle error, so a few things that could be problematic with your "big" xml -
    1.) An element name could be of length > 30 characters (Oracle table name length limit is 30)
    2.) There are some special characters in the element name
    3.) Element name begins with a Number
    4.) Element name is an Oracle reserved word.
    This list can go on.

  • Date format error while accessing date from SQLSERVER

    Hi all, in me webdynpro application I have taken Date type for the Input Field.
    At date select it is displaying in the format
      *2/14/2009 i.e. mm/dd/yyyy*
    And when I am saving date in the sql database then the date format changes to..
    2009-02-14 i.e..yyyy/mm/dd.
    But using the Date format method I have changed the format as per the need to push date in the SQL database table...
    In the table SQL the date attribute is in form i.e.    02/14/2009 as like from the date select from the date Input Fieldu2026But the problem is that database is not being able to display in that Input field again.
    I have use the coding both at Insertion and selection of the database i.e..
    Date Sdate, Edate;
    Sdate     =   Date.valueOf (rs.getString ("Sdate"));
    Edate     =   Date.valueOf (rs.getString ("Edate"));
    SimpleDateFormat date Formatter = new SimpleDateFormat ("MM/dd/yyyy");
    Sdate = wdContext.currentProjectElement ().getEdate ();
    Edate = wdContext.currentProjectElement ().getEdate ();
      String Sd = dateFormatter.format (Sdate);
      String Ed = dateFormatter.format (Edate);
      Date Sdd =Date.valueOf (Sd);
      Date Edd =Date.valueOf (Ed);
    But at selection of the database the error for the date format isu2026.
    java.lang.IllegalArgumentException
    If somebody knows how to resolve this ,plz let me know
    Regards:
    SK

    for displaying the value only, I think, you are converting to string.
    sol1:
    1. Create a simple type in dictionary: under Dictionary -> Local Dictionary -> Simple Types
    2. go to Definition tab: Change Built-in Type as Date
    3. go to Representation tab: specify format e.g.: MM/dd/yyyy
    4. go to Context and change the date context attribute to the created type.
    sol2:
    please try to minimize the casting between Date and String.
    I believe in database date is stored as Date type itself. My suggestion will be for displaying keep a separate attribute and set it on each db call.
    below code is converting from Date to String.
    Date Sdate, Edate;
    Sdate = rs.getDate ("Sdate");
    Edate = rs.getDate ("Edate");
    SimpleDateFormat date Formatter = new SimpleDateFormat ("MM/dd/yyyy");
    String Sd = dateFormatter.format (Sdate);
    String Ed = dateFormatter.format (Edate);

  • Date Formatting error in JDBC adapter

    Hi,
    While inserting date using a Receiver JDBC Adapter i am getting a "Month not valid" error can anyone please tell me how do i pass date in the required format. Database is Oracle.

    Hi Vinay,
    Oracle's default format for DATE is "DD-MON-YY"
    With the functions to_char and to_date, a date format can be used. Example:
    select to_char(sysdate,'DD/MM/YYYY HH24:MI:SS') from dual;
    will return something like: 24/03/2006 14:36:43
    Regards,
    Prateek

  • Different date format in different database..

    Hi,
    We have two database (10g) with same NLS settings.When we are reading the data from a table and assigning the value to XML tags using oracle.xml.sql.query.OracleXMLQuery class , with one database connection, the data format is coming as MM/DD/YYYY like <PYMT_DATE>7/23/2008 0:0:0</PYMT_DATE>
    but with other database it is coming as YYYY-MM-DD like <PYMT_DATE>2009-08-10</PYMT_DATE>..
    Can somebody help me out ?

    hi..
    Check the data format used to retrieve the date in the query ..
    TO_DATE (......................)
    Check whether both the db's are having same conversions..

  • DATE FORMAT (ORACLE PORTAL) -----   (DATABASE)

    I had a conversion ERROR while I was inserting DATE value from
    dynamic LOV to database(probably because of the different
    default DATE FORMAT of LOV query and database). I fixed the
    problem with TO_CHAR funtion in the LOV query,where I changed
    the date format...
    But the ERROR could appear again if application was running on a
    different database. What can I do to dynamically change the DATE
    FORMAT, depending on the DATABASE???

    Put this code in advanced pl/sql block beofre displaying page
    dbms_session.set_nls('nls_date_format',
    '''MM/DD/YYYY''');
    set date format that you want.....

  • Date format error

    Hi All,
    I have three records in my table tmp_ext_om_email_data in varchar2 format as
    18122011
    19122011
    20122011
    Now I want that to be in date format like 18-DEC-2011,19-DEC-2011 .....
    How should I do that.. If i run below code it gives error as -01481 invalid number format.
    declare
    x varchar2(15);
    cursor c_trans_date_cur is
        select distinct t.transaction_date
          from tmp_ext_om_email_data t ;
    begin
          for i in c_trans_date_cur loop
              x  := to_char(TRIM(i.transaction_date),'DD-MON-YYYY');
            dbms_output.put_line('The Date is :'||x);
          end loop;
    end;How will i get o/p as
    18-DEC-2011
    19-DEC-2011
    20-DEC-2011
    Thanks,
    Sid

    Hi, Sid,
    Here's one way:
    SELECT     TO_CHAR ( TO_DATE ( transaction_date
                       , 'DDMMYYYY'
              , 'DD-MON-YYYY'               -- or '"The Date is: "DD-MON-YYYY'
              )      AS formatted_transaction_date
    FROM    tmp_ext_om_email_data
    ;Storing date information in a VARCHAR2 (or NUMBER) column is not a very good idea. Use DATE columns for date information.
    If any strings are incorrectly formated, or contain impossible dates (such as '29022011') the query above will cause a run-time error. For work-arounds, see
    Re: how to select valid dates only

  • Date Format  error while loading *.dat  file to Sataging .

    Hi All ,
    Loading data from *.dat file in to Staging , the dat file contains data for date in 'MM-DD-YYYY' format which is String , when it loading by control file it produce the error date format is not supported .I think ti required DD-MM-YYYY format . Is their any properties to change the date format or else need to write the function for converting date format .
    I am using OWb 10g Release 1 , with same DB .
    Please guide me
    Thanx in advance
    Regards ,

    Hi,
    Before loading into staging, you can use Expression operator to convert the CHAR into DATE with something like this:
    TO_DATE('01-02-2005','MM-DD-YYYY')
    Hope this helps.

Maybe you are looking for

  • IWeb '08 Website Design Changes on Multiple Compters

    Quick question. I have two iMacs (one at home and one at work). I want to be able to work on my iWeb website on both computers using .Mac. When I go to look for the website file on my home computer all I see is a folder with the files that are on my

  • Incorrect FM update in RFFMS200 (FMF0)

    Hi experts, When I have Vendor invoices cleared by a payment document with 3 lines (vendor line, Bank Account line fin trans. 90 and Withholding tax line fin trans. 50), the payment transfer program RFFMS200 doesn't change the status of the FM doc to

  • CID or ContractID for Firefox PDF Plug-in XPCOM (XPT)

    Can anyone at Adobe tell me the CID / ContractID for the Web2PDF Firefox plug-in for the XPCOM (IWeb2PDFComponent.xpt) component? For some reason, the XPT isn't loading and I wanted to try it by CID. web2pdfcomp_cinst = Components.classes["@adobe.com

  • Downgrade from CS5.5 to CS5

    Is it possible to downgrade and use CS5 to open files saved in CS5.5?  I think there is a major bug in AME CS5.5. Thanks

  • X segfaults when using fglrx

    So after reading this post in my thread from the other day, I've decided to try and get fglrx working to see if this would resolve my issue.  All went well in installing and building the driver modules, but when restarting X, I got thrown back to a c