Updating XML datastore

Hello experts,
I created an interface where a xml file is reverse engineered as a source datastore. The data from the xml gets pumped into an oracle target db. This all goes well.
I am creating a scenario where I am getting a xml file from a ftp server on a daily basis (with agent). This new xml file has the same structure as the one already used in the interface. The question is: how can I update the data of the xml datastore?
I tried replacing the original xml file but this doesn't work and cdc doesn't seem to apply here, I have been searching for quite a while now.
Thanks a lot!
yves

Hi,
See if this helps
XML to Oracle interface has same insert count regardless of XML input file
Thanks,
Sutirtha

Similar Messages

  • HTTPService not reading updated xml, i've been having to refresh the xml in my browser manually

    I am calling an HTTPService (id=data2php) which runs a php
    script which creates an xml doc and puts it on my server. i then
    call another HTTPService (id=feedRequest) which reads the xml doc.
    i then try to populate a datagrid with the lastResult of my
    HTTPService that reads the xml doc. My issue is that that the
    HTTPService which reads the xml doc reads the previous incarnation
    of the xml doc, not the newly created one that my HTTPService
    (data2php) created. i've been manually going to the xml doc in my
    browser and hitting refresh for my feedRequest HTTPService to read
    the updated xml.
    here is the mxml for the httpservice that reads the xml:
    <mx:HTTPService id="feedRequest" url="
    http://cfcdi.org/eric/dashboard/php/sales.xml"
    result="feedResult(event)" resultFormat="xml" useProxy="false"/>
    pretty straight forward.
    (actually, once in a while it will read the updated
    one)

    LittleMuscle,
    Instead of binding to the lastResult property, I would
    explicitly handle the result and fault events of the HTTPService
    (the one that reads the newly created xml doc) and then manually
    update an XMLListCollection for use as the datagrid's dp. That way,
    you can at least walk through the debugger and see what's going on,
    and force the second HTTPService to read only when you're sure the
    newly created doc is ready.
    Since you said it works sometimes and not other times, it
    sounds like it's just a timing problem, sometimes the xml doc is
    created quickly enough that the HTTPService grabs the new xml doc,
    but if not, it's grabbing the old one. That would be my
    guess.

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • I did the update to 3.6.11 - when it restarted it will not open any pages. When i go to check for updates it gives me this error: Update XML file malformed (200) - Any advice?

    I did the update to 3.6.11 - After it started Firefox it would go to the requested site in the addressbar, but the page would be blank. I went to check for updates and it told me there was a problem in updating. It gave me this error message: Update XML file malformed (200)
    I uninstalled and reinstalled and the same problem exists.
    Any advice?

    For the error message see [[AUS Update XML File Malformed 200]].
    As it appears not to be able to load any sites, a possible cause is your firewall blocking the new version of Firefox. For more details see [[Firefox cannot load websites but other programs can]].

  • HOw to update XML file residing in DAM by component JSP in run-time?

    i have made a component which reads xml file residing in DAM.
    Content Author can fill some values in dialog of this component, as soon as author provide the values,i have to update these values in XML file and component reloadsby reading the updated xml file.
    i am trying to achieve this by making object of XML file and giving it's path., but i ma unable to access the XML file.
    Can anyone help me out to how to update XML file by component JSP in run-time?

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to update XML Facts in rule author

    Hi,
    since there is not a separate forum for the rules engine and this is tightly related to BPEL, so I thought I'd post the question here.
    what's the process to update XML Facts in the rule author and the BPEL process that is already using the rule repository for decisions?
    for example, if I change the data type on one of the elements in the XML Facts schema from string to int, what do I do next to put such change into the existing rule repository and update the BPEL side of things?
    I have tried re-importing the updated XSD into the rule repository (it's a WebDAV repository), I can see the change in the new definitions for the xsd, and I can also make use of the change to define new rules, in the words, the rule author side seems fine;
    then I copied the updated xsd into my BPEL project that calls the rules engine, and then what should I do next? I can't see any where in jDeveloper I can "update" the decision service partner link, so I just re-deployed the BPEL process with the updated xsd under the rule/xsd folder, but then the same call to the decision service starts failing with a "business exception, cx-fault-actor" but without any more details.
    I haven't added any new rules, only change of data type on one element.
    what am I missing?
    thanks.

    In ALDSP 2.5 (and ALDSP 3.0), non-XA data sources can be updated without writing an update-override. But if you want to do any special processing that is not handled by the default behaviour, or for data services not based on relational databases, in ALDSP 2.5, you can write an update-override.
    In ALDSP 3.0, the update model is somewhat different, I suggest that you peruse the ALDSP 3.0 documentation for a thorough discussion. The documentation is here http://edocs.bea.com/aldsp/docs30/index.html I suggest start with a search on 'update'.
    In ALDSP 3.0, I believe updateoverride feature still exists for the purpose of backwards compatibility (at least it turned up in a search of updateoverride in the 3.0 docs)

  • SQL Functions to Update XML Data

    Hi,
    Can anybody please tell me whether SQL Functions to Update XML Data (such as updateXML, insertChildXML, insertXMLbefore etc) are available with oracle 9i or not?
    Please tell me.

    You can also do a describe on SYS.XMLTYPE to see what methods are supported in your release. How would you find e.g. insertChildXML in DESC sys.xmltype? I suppose it is not a Method of the Type: Summary of XMLType Subprograms.

  • Error importing sample/update.xml when upgrading IDM5.0 to IDM5.0 SP4

    Hellos,
    I fail to upgrade to SP4 on the last step, importing the update.xml file.
    The Browser window has in red text:
    "An error occurred importing the file, although some of the file data may have been processed. ==> com.waveset.util.InternalError: Class com.waveset.view.ViewUpdater not found."
    I see in a text box many lines.. refreshing 0 of 2 etc..
    last line says Found no instances of AdminRole, not suprising as it a first time install.
    My system is Solaris 9 with MySQL 4.0.24 as repository (need 4.0.24 as we MUST HAVE EXTENDED ASCII CHARACTER SUPPORT, 4.1.x is no good) and SunApplicationServer8 as AS.
    The IDM5.0 install and deploy was fine. The upgrade was going fine too until last step.
    I upgrade by following the steps in IDM5.0_SP4_REAME.pdf.
    What is unclear is whether with Sun AS8 I need to undeploy idm and rebuild idm.war after installing the SP4. The instructions assume we all use tomcat and windows.
    I simply ran ./install, started the AS and tried to import
    sample/upgrade.xml. I did NOT undeploy idm, jar it up again and redeploy it.
    Anyways.. what I guess my IDM is now FUBR any hints how to recover?

    I prefer to perform manual upgrades in which there is a staging directory (see the installation document) where you unjar the idm.war and make all the necessary changes and then jar it and redeploy. I have uses the same process for successful upgrade for WebsphereAS 5.0 and it worked great. I have heard others talking about similar issues because it seems the jar files are not upgraded in the process that you have used.

  • Updating XML content

    Please, I would to know how I could update XML content from
    Spry... I need a dbless system (i means, without convencional db
    engine, with XML only). Could someone help me?
    Thanks in advance

    John:
    I need to:
    - Load an XML file
    - Modify or insert a node
    - Store the results in the XML file loaded no beginning. (I
    can do it through server side code, as Slade said)
    I need to know if Spry offer a support to do the second
    feature (modify or increase a XML file).
    Thanks for the responses; if Spry have not that features I
    think that I will use Sarissa to do that; I´m really looking
    for a unique library-framework that cover all features for XML
    treatments, but I think that doesn´t exists.

  • Migrating V9 to V10: Update XML Fragment CLOB does not work anymore

    I have an XML Schema that contains an element, named Operazione, mapped to a CLOB.
    I just migrate to Oracle 10.1.0.2.0 from version 9.2.0.2.0 and the code I developed does not work anymore.
    To get a CLOB on v 9.2.0.2.0 I issued the following statement:
    select extractValue(value(p),'/operazione.log/Operazione') from XMT_OPERAZIONE_LOG p
    where existsNode(value(p),'/operazione.log/Journal[NumeroElettronico=1234567890]') = 1
    To make it working on V10 I have to change it as follow:
    select extract(value(p),'/operazione.log/Operazione').getClobVal() from XMT_OPERAZIONE_LOG p
    where existsNode(value(p),'/operazione.log/Journal[NumeroElettronico=1234567890]') = 1
    So using extract intead of extractValue and adding getClobVal() I was able to read the CLOB.
    The problem that I was not able to solve is related to CLOB update. In V9 just adding the “for update” clause I was able to change the CLOB value on DB.
    In V10 if I run the V9 statement I get the error:
    ORA-03113: end-of-file on communication channel
    If I use the statement modified for V10, adding the “for update” clause, I get the CLOB and I can change the CLOB value but nothing goes on the DB. Probably I am working on a copy of the DB CLOB.
    If I remove the getClobVal() I get an OPAQUE type that I can use on a XMLType but, still, nothing is stored on DB.
    Any suggestion ?
    I tried with both OCI and Thin Client

    Can anybody help me ?
    Is it better to use different strategies ( eg. Stored Procedure, DBMS_XMLSTORE etc, etc. ) ?
    Any experience updatating XML Fragment CLOB on Oracle V10 ?

  • Form or form on report to update XML tagS stored in CLOB field.

    I would like to create a form or a form on a report
    where i can update xml tags. The xml data is stored in a CLOB field.
    sample CLOB DATA
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE preferences SYSTEM 'http://java.sun.com/dtd/preferences.dtd'>
    <preferences EXTERNAL_XML_VERSION="1.0">
    <root type="user">
    <map />
    <node name="com">
    <map />
    <node name="mynode">
    <map />
    <node name="utils">
    <map />
    <node name="properties">
    <map>
    <entry key="Save" value="ON" />
    <entry key="TM_PORT" value="55555" />
    <entry key="TM_PORT2" value="7777" />
    <entry key="SubID" value="all" />
    <entry key="UserDBUsr" value="myuser" />
    <entry key="JMS_JDBC" value="OFF" />
    <entry key="Side" value="BUY" />
    <entry key="HEALTH_MONITOR_CRITICAL_DISK_SPACE" value="500" />
    <entry key="HEALTH_MONITOR_WARNING_DISK_SPACE" value="750" />
    <entry key="HEALTH_MONITOR_PERIOD" value="600000" />
    </map>
    </node>
    </node>
    </node>
    </node>
    </root>
    </preferences>
    the goal is to have a form where i can view and update the "value" of following:
    TM_PORT
    TM_PORT2
    SubID
    UserDBUsr
    JMS_JDBC
    Side
    HEALTH_MONITOR_CRITICAL_DISK_SPACE
    HEALTH_MONITOR_WARNING_DISK_SPACE
    HEALTH_MONITOR_PERIOD
    I have searched around this forum but could not find an example.
    it would be cool if I could also load the an xml file into the clob.
    Thank you.

    Hi,
    I think you just study first the topics about XML DB to understand how to manupulate xml data in the database.
    See:
    http://www.oracle.com/technology/tech/xml/xmldb/index.html
    and
    XML DB
    Regards,
    Cafer

  • Update xml string values.

    Hi,
    I'm on 11.2.0.2 and got table with nclob column which stores long xml string .
    {code}
    "<?xml version="1.0" encoding="UTF-8"?>
    <?fuego version="6.5.2" build="101272"?>
    <set>
    <configuration name="TEST Database" type="SQL" subtype="DDORACLE">
      <property name="jdbc.pool.idle_timeout" value="5"/>
      <property name="jdbc.pool.entry.max" value="10"/>
      <property name="oracle.dateEqualsTimestamp" value="false"/>
      <property name="jdbc.schema" value="user1"/>
      <property name="jdbc.host" value="hostname"/>
      <property name="user" value="user1"/>
      <property name="jdbc.port" value="1521"/>
      <property name="jdbc.pool.min" value="0"/>
      <property name="jdbc.pool.maxopencursors" value="50"/>
      <property name="oracle.sid" value="dbsid"/>
      <property name="password" value="user101"/>
      <property name="jdbc.xa" value="false"/>
      <property name="jdbc.pool.max" value="10"/>
    </configuration>
    <configuration name="TEST Database2" type="SQL" subtype="DDORACLE">
      <property name="jdbc.pool.idle_timeout" value="5"/>
      <property name="jdbc.pool.entry.max" value="10"/>
      <property name="oracle.dateEqualsTimestamp" value="false"/>
      <property name="jdbc.schema" value="user2"/>
      <property name="jdbc.host" value="hostname"/>
      <property name="user" value="user2"/>
      <property name="jdbc.port" value="1521"/>
      <property name="jdbc.pool.min" value="0"/>
      <property name="jdbc.pool.maxopencursors" value="50"/>
      <property name="oracle.sid" value="dbsid2"/>
      <property name="password" value="user201"/>
      <property name="jdbc.xa" value="false"/>
      <property name="jdbc.pool.max" value="10"/>
    </configuration>
    </set>
    {code}
    My goal is to update password value in such way that it equals to value from jdbc.schema value  <property name="jdbc.schema" value="user2"/>   so in this case user2 || '01'
    <property name="password" value="user201"/>   <-- that is my goal .
    Regards
    Greg

    Hi,
    You can find a few methods here : How To : Update XML nodes with values from the same document | Odie's Oracle Blog
    They're not all applicable to your version and settings though.
    Here's the first one applied to your case :
    declare
      v_xmldoc   xmltype;
    begin
      select xmlparse(document to_clob(t.xmldoc))
      into v_xmldoc
      from my_nclob_table t
      where t.id = 1;
      for r in (
        select idx, schema_name
        from my_nclob_table t
           , xmltable(
               '/set/configuration'
               passing v_xmldoc
               columns idx         for ordinality
                     , schema_name varchar2(30) path 'property[@name="jdbc.schema"]/@value'
      loop
        select updatexml(
                 v_xmldoc
               , '/set/configuration['||to_char(r.idx)||']/property[@name="password"]/@value'
               , r.schema_name || '01'
        into v_xmldoc
        from dual ;
      end loop;
      update my_nclob_table t
      set t.xmldoc = to_nclob(xmlserialize(document v_xmldoc indent))
      where t.id = 1;
    end;
    Here's another one, using DOM :
    declare
      doc   clob;
      p        dbms_xmlparser.Parser;
      domdoc   dbms_xmldom.DOMDocument;
      docnode  dbms_xmldom.DOMNode;
      conf_list      dbms_xmldom.DOMNodeList;
      conf_node      dbms_xmldom.DOMNode;
      password_node  dbms_xmldom.DOMNode;
      schema_name     varchar2(30);
      password_value  varchar2(256);
    begin
      select to_clob(xmldoc)
      into doc
      from my_nclob_table
      where id = 1 ;
      p := dbms_xmlparser.newParser;
      dbms_xmlparser.parseClob(p, doc);
      domdoc := dbms_xmlparser.getDocument(p);
      dbms_xmlparser.freeParser(p);
      docnode := dbms_xmldom.makeNode(domdoc);
      conf_list := dbms_xslprocessor.selectNodes(docnode, '/set/configuration');
      for i in 0 .. dbms_xmldom.getLength(conf_list) - 1 loop
        conf_node := dbms_xmldom.item(conf_list, i);
        dbms_xslprocessor.valueOf(conf_node, 'property[@name="jdbc.schema"]/@value', schema_name);
        password_node := dbms_xslprocessor.selectSingleNode(conf_node, 'property[@name="password"]/@value');
        dbms_xmldom.setNodeValue(password_node, schema_name || '01');
      end loop;
      dbms_xmldom.writeToClob(domdoc, doc);
      dbms_xmldom.freeDocument(domdoc);
      update my_nclob_table t
      set t.xmldoc = to_nclob(doc)
      where t.id = 1;
    end;
    Message was edited by: odie_63 - added DOM example

  • XML Datastore with default precision length

    Hi All,
    While creating a xml datastore in model by using xsd, it creates columns with default column length/precision. I need them to be exact to target db.
    Here is the sample xsd with columns restriction...
    <xsd:element name="NAME" minOccurs="1" xdb:SQLName="NAME"
    xdb:SQLTYPE="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="960"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="DESCRIPTION" minOccurs="0" xdb:SQLName="DESCRIPTION"
    xdb:SQLTYPE="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="4000"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="STAT_CD" minOccurs="1" xdb:SQLName="STAT_CD"
    xdb:SQLTYPE="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="120"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PROFILE_TYPE" minOccurs="0" xdb:SQLName="PROFILE_TYPE"
    xdb:SQLTYPE="VARCHAR2">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="60"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="REGN_ID" minOccurs="0" xdb:SQLName="REGN_ID"
    xdb:SQLTYPE="NUMBER">
    <xsd:simpleType>
    <xsd:restriction base="xsd:integer">
    <xsd:precision value="18"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    Here simpletype defines the length/precision or the element.
    While creating datastore by reverse engg it takes the dedault length which is 10 for numeric and 255 for varchar.
    Is this xsd is wrong or something else.

    Can someone provide me a sample xsd which has defined column length for each attribute.

  • Urgent Issue: Error Mapping Existing Forms to manually updated XML

    Hi All,
    We are working on pretty complex InfoPath form which contains 150+ fields. Based on new requirements, we added few sections containing
    repeating tables with default data of multiple rows (using default values feature). To make sure that existing forms get these repeating table values correctly we wrote a PowerShell script to update the existing forms (xml files) directly.
    This is done so that when an existing form is opened data should get properly mapped. But unfortunately only few repeating tables are showing the correct data and other repeating tables are showing only first record multiple times. This is working for new
    forms exactly the way we expect.
    We tried to download the xml file and updating the changed xml section from new form xml but it still does not work and shows the same issue. But when we open the existing
    form, save it, download it and then change the xml with xml from new form, it works. Somehow when we open existing forms, the mapping is not correct.
    Please guide me on this issue. Appreciate your help.
    Please let me know if I need to provide more details.
    Thanks,
    Rahul Babar
    ASP.NET, C# 4.0, Sharepoint 2007/2010, Infopath 2007/2010 Developer http://sharepoint247.wordpress.com/

    Dear Rahul,
    The problem is very well clear, but in order to suggest in your solution I recommend to post the code you used in PowerShell to update xml, any XSLT customization, custom code related to the repeating table you have implemented etc.
    If you find this information as helpful please mark this as ANSWER or HELPFUL. Thanks

  • ORA-00600: internal error code while using UpdateXML to update xml content

    Hi,
    I have been using the UpdateXML command to replace content of xml stored in XMLType. It was working absolutely fine.
    Below is the query:
    UPDATE temp d SET d.message_content = updateXML(d.message_content,'//*[.="Test" ]/text()','"Test123"') WHERE                          existsNode(d.message_content,'//*[.="Test"]')=1";
    But now i'm getting an exception as follows:
    ORA-00600: internal error code, arguments: [qmcxeUpdateXml:2.1], [], [], [], [], [], [], []
    The table uses a Free Test Index.
    I searched the forum and found from the given link https://forums.oracle.com/forums/thread.jspa?threadID=2352772 that corrupted Index may be the cause of this problem. I'm still clueless :(
    Can someone help me?

    Hi sprightee,
    That thread you found seems to be a different problem (Ora-600 argument is different)
    I think you have hit bug 6811908, at least if Odie is correct about your version.
    Bug says No workaround - Fixed in 11.1.0.8
    Regards
    Peter

Maybe you are looking for

  • Different Terms Of Payment for one Vendor

    Hi all, For one big vendor we have different terms of payment (TOP) for different company codes. As we use only one purchase organization we can not differentiate between them. I found one posting to use vendor sub-ranges. But this is not practicable

  • Statement "CALL TRANSACTION" is not allowed in this form.

    Hi I have a form in which i want to call a transaction:   CALL TRANSACTION 'VL32N'  USING bdc_tab                                                    MODE    'E'                                                    UPDATE  'S'                           

  • Plz help me in following questions

    8.     Execute the procedure created in Question 7 to create an Order record for customerID = "VINET", EmployeeID = 100, OrderDate = CurrentDate with a RequiredDate of January 4, 2007. Show the OrderID of the order inserted into the Order table.

  • Average computed incorrectly ?

    Hello , please help me with the following problem. while using OBIEE 11g (11.1.1.5.0) I came into a situation when average is not computed correctly. essentially it happens when creating a simple analysis having a single view that has one or more EXC

  • How to keep HTML code in the applet source (.java) file itself?

    Hi, How to keep HTML code (APPLET tag) in the applet source (.java) file itself? Please give an example? thank you,