Storing and Updating XML-documents in interMedia

Hi,
I have an idea to do the following with the help of interMedia.
We work with 8.1.7 at the moment.
Is this a feasable or not???
1) Receive lots and lotts of XML-messages.
2) Store each one of all these XML-messages in a CLOB (maybe divide the XML-message into a few smaler parts for Read only and for Update)
3) Search these XML-messages.
4) Display the result in a list.
5) Present one of these XML-message in HTML.
6) Manipulate it throug HTML and uppdate the original XML-message in its CLOB.
Is this possible or not!
Please help me in answering this or give me directions to where i can find an answer!
Roland

Hi,
http://www.dom4j.org/
Hope this helps
Jakub Krecicki

Similar Messages

  • Storing and searching XML in CLOBs

    Speaking to an oracle employee at the Oracle booth at JavaOne
    recently. They suggested I store XML in CLOBs
    and use the DOM or SAX to reparse the XML later as needed.
    I agreed that this was the best solution for my problem
    (which was how to manage many different XML documents using many
    different DTDs in a document management system)
    The big problem was searching this document repository
    to locate relevant information.
    This is where Intermedia seemed ideal (still does).
    It would be nice to see an example of setting this up using
    Intermedia in Oracle 8i, demonstrating how to define the
    XML_SECTION_GROUP and where to use a ZONE as opposed to a FIELD
    etc.
    Anybody care to take a shot at this ????
    For example:
    How would I define Intermedia parameters
    so that I would be able to search my CLOB
    column for records that had the <keyword>
    "aorta" and "damage" in the <caption>
    using the following
    XML (DTD implied)
    <image filename="OurImageName.gif">
    <fname>WellKnownFileName.gif</fname>
    <keyword>echocardiogram</keyword>
    <keyword>aorta</keyword>
    <caption>This is an image of the vessel damage</caption>
    </image>
    Thanks
    Thomas Bennett
    null

    Eric (guest) wrote:
    : You can't do XML structure-based searches with intermedia. You
    : can search for text within a given element, but nothing more
    : complicated than that.
    The example he gave involves exactly that -- searching for
    text within XML elements. interMedia can do this.
    : It also does not do attributes.
    Upcoming 8.1.6 version allows searching within
    attribute text. That's something like:
    dog within book@author
    We're working on attribute value sensitive search,
    more like:
    dog within book[@author = "Eric"]
    : Thomas Bennett (guest) wrote:
    : : How would I define Intermedia parameters
    : : so that I would be able to search my CLOB
    : : column for records that had the <keyword>
    : : "aorta" and "damage" in the <caption>
    : : using the following
    : : XML (DTD implied)
    : : <image filename="OurImageName.gif">
    : : <fname>WellKnownFileName.gif</fname>
    : : <keyword>echocardiogram</keyword>
    : : <keyword>aorta</keyword>
    : : <caption>This is an image of the vessel damage</caption>
    : : </image>
    begin
    ctx_ddl.create_section_group('mygrp','basic_section_group');
    ctx_ddl.add_field_section('mygrp','keyword','keyword');
    ctx_ddl.add_field_section('mygrp','caption','caption');
    end;
    create index myidx on mytab(mytxtcolumn)
    indextype is ctxsys.context
    parameters ('section group mygrp');
    select * from mytab
    where contains(mytxtcolumn, 'aorta within keyword')>0;
    options:
    * use XML section group instead of basic section group
    if your tags have attributes or you need case-sensitive
    tag detection
    * use zone sections instead of field sections if your
    sections overlap, or if you need to distinguish
    between instances. For instance, keywords. If keywords
    is a field section, then
    (aorta and echocardiogram) within keywords
    finds the document. if it is a zone section, then it
    doesn't, because they are not in the SAME instance of
    keywords.
    null

  • Updating XML document

    After creation of a XML document through DOM is it possible to update the same XML document with new tags
    Thanks
    Sasanka

    s, it is possible to xmldocument with new tags.for example u need to create a new node of requirement and import that node to required document and use replace to update.

  • Updating XML document using DOM only updates in memory

    I am trying to update an element value but it only gets updated in the memory and displayed. It does not physically change the xml document when I look after running the program.
    Here is the code I am trying to run :
    Please let me know what I am doing wrong.
    static private Document findReplace(Document document, String elementName,
    String valueToFind, String valueToReplace)
    int i;
    int k;
    NodeList children;
    Element docRoot= document.getDocumentElement(); // get root
    NodeList elements = docRoot.getElementsByTagName(elementName);
    if (elements !=null)
         for (i=0;i<elements.getLength(); i++)
         if (elements.item(i).hasChildNodes())
         children = elements.item(i).getChildNodes();
    for(k=0;k<children.getLength(); k++)
              if (children.item(k).getNodeType() ==
                   org.w3c.dom.Node.TEXT_NODE){
              if(children.item(k).getNodeValue().equals(valueToFind))
         children.item(k).setNodeValue(valueToReplace);
    Thanks !

    Document document;
                   TransformerFactory tFactory =
                    TransformerFactory.newInstance();
                   Transformer transformer = tFactory.newTransformer();
                   DOMSource source = new DOMSource(document);
                   StreamResult result = new StreamResult(new File
                   (c:/output/outputXml.xml));
                   transformer.transform(source, result);

  • Parse and output XML document while preserving attribute order

    QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes?
    The following code will parse and XML document and generate (practically) unchanged output. However, all attributes are ordered a-z
    Example: The following element
    <work_item_type work_item_db_site="0000000000000000" work_item_db_id="0" work_item_type_code="3" user_tag_ident="Step" name="Work Step" gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_site="0000000000000000" last_upd_db_id="0" rstat_type_code="1">
    </work_item_type>is output as:
    <work_item_type gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_id="0" last_upd_db_site="0000000000000000" name="Work Step" rstat_type_code="1" user_tag_ident="Step" work_item_db_id="0" work_item_db_site="0000000000000000" work_item_type_code="3">
    </work_item_type>As you may notice, there is no difference in these besides order of the attributes!
    I am convened that the problem is not in the stylesheet.xslt but if you are not then it is posted bellow.
    Please, someone help me out with this! I have a feeling the solution is simple
    The following take the XML from source.xml and outputs it to DEST_filename with attributes in a-z order
    Code:
    private void OutputFile(String DEST_filename, String style_filename){
         //StreamSource stylesheet = new StreamSource(style_filename);
         try{
              File dest_file = new File(DEST_filename);
              if(!dest_file.exists())
                  dest_file.createNewFile();
              TransformerFactory tranFactory = TransformerFactory.newInstance();
              Transformer aTransformer = tranFactory.newTransformer();
              aTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
              Source src = new DOMSource("source.xml");
              Result dest = new StreamResult(dest_file);
              aTransformer.transform(src, dest);
              System.out.println("Finished");
         catch(Exception e){
              System.err.print(e);
              System.exit(-1);
        }

    You can't. The reason is, the XML Recommendation explicitly says the order of attributes is not significant. Therefore conforming XML serializers won't treat it as if it were significant.
    If you have an environment where you think that the order of attributes is significant, your first step should be to reconsider. Possibly it isn't really significant and you are over-reaching in some way. Or possibly someone writing requirements is ignorant of this fact and the requirement can be discarded.
    Or possibly your output is being given to somebody else who has a defective parser which expects the attributes to be in a particular order. You could quote the XML Recommendation to those people but often XML bozos are resistant to change. If you're stuck writing for that parser then you'll have to apply some non-XML processing to your output to fix it up on their behalf.

  • XPath to Update XML document

    Using XPath I can read a particular node of an XML document through JAVA program. However, is it possible to Update the value of the node, just read from XML doc, using XPath expressions ?

    That is blatant misinformation. Xpath is used all the time to select nodes from a document. The returned nodes are references to parts of the document, therefore this it should be easy to update any part of it having retrieved the required nodes.

  • Extracting and Loading XML document

    We need to extract and load an XML document into the database
    For e.g.
    <ROW> <EMP_ID>1</EMP_ID> <EMP_NAME>SSK</EMP_NAME>
    <RESUME> Resume of sssk
    </RESUME>
    </ROW>
    We need to load emp_id, emp_name to emp_id, emp_name field in the database and <RESUME> field to a CLOB.
    The table is as follows
    EMP_ID NUMBER
    EMP_NAME VARCHAR2(100)
    RESUME CLOB
    How exactly is this done using the XSU utility? Does it support loading of <RESUME> data in this case to a CLOB.
    Where could I find examples of doing this.
    null

    The "first child" of most of your elements is a white-space node containing a newline character. Your code incorrectly assumes it is an element node.

  • OSB: How to get stored in sbconsole xml document in message flow

    Hi
    I created a xml document (say ram.xml) as a XML document utility resource in OSB sbconsole.
    I want to refer this in message flow with fn:doc. Unlike xquery i can't assign ram.xml to a variable.
    I tried fn:doc("/home/osbuser/user_projects/domains/domain_name/osb/config/core/ram.xml") and fn:doc("file:////home/osbuser/user_projects/domains/domain_name/osb/config/core/ram.xml") it didn't work!
    I know if i store this xml as a xquery, it will get assigned to a variable. But i am just curious to see how fn:doc works!
    Any light !

    The reason for this is to eliminitate each assign action for each of XMLs that I use. Each assign gets converted into a xml bean and thats overhead.
    If this fn:doc() works, what i am planning is to use fn:doc() inside my xquery transformations directly, without using assign action to load XML.
    Also message flow will become somewhat cleaner.
    fn:doc() has to be used in a way that it uses relative path to access xml and not complete path (starting from /home/user_doamains/..) because development and production environment domain names are different. Using relative path, code can migrate without any change across environments.

  • Writing and updating XML file on client side

    Hello,
    I'm looking for a simple example which permit to write and
    update a xml file on the client side.
    Someone can help me, please?

    meghashyamgr ,
    Because of security reasons a swf running in a browser cannot
    read or write xml files to a user's computer. What can be done,
    however, is write xml to what is known as a SharedObject.
    SharedObjects act as cookies for Flashplayer.
    If you would like an example of this I'd be more than happy
    to show you...

  • How to change value of element and update XML file

    Hi
    I have an xml file called test.xml like below
    <?xml version="1.0" encoding="UTF-8"?>
    <printing>
         <userName/>
         <viewName/>
    </printing>I want to change value of user name and view name and update test.xml file in my folder
    Anyone has sample code to do so
    Ashish

    Thanx
    i was able to do so, but what i want now is to remove element
    for example
    i have following xml
    <?xml version="1.0" encoding="UTF-8"?>
    <printing>
    <firstLineTexts>
              <firstLineText />
              <firstLineText>|line11</firstLineText>
              <firstLineText>|line12</firstLineText>
    </firstLineTexts>
    </printing>how do i remove all elements fireLineText
    my final output should be
    <?xml version="1.0" encoding="UTF-8"?>
    <printing>
    <firstLineTexts>
    </firstLineTexts>
    </printing>How do i do it using DOM,
    I can create instance of DOM and write it using TransformerFactory
    Ashish

  • Difference between SDO and a xml document

    Hello,
    I want to know what is the exact difference between a SDO and XML document.According to my understanding, SDO defines a Java binding framework of its own. XML is a kind of data being bound to SDO.
    SDO can be represented as XML.
    But what is the difference between a normal XML document and a XML representing a SDO ?
    How can we say by looking at a XML doc that it is a representation of a SDO and not JUST ANY xml doc?
    Please clarify.
    Thanks
    Nutan

    Let's see.
    Facelets creates a facelets page
    JSP creates a JSP page
    {noformat}:){noformat}
    Facelets is the "official" view language for JSF 2.0
    http://www.realdevelopers.com/blog/development/facelets-vs-jsp should give you some more insight as well.
    John

  • Xpath and Get XML Document Data

    Good Morning,
    I have just recently gotten involved in a project that requires communicating with some web services (axis2). We have existing scripts that handle this already, but they were built when we weren't on axis2 so now the XML output from the web service call is slightly different and i am no longer able to use the same xpath statement in the Get XML Document Data step.
    I am receiving either null values or a prefix namespace error. I am new to xpath and have been reading as best i can from http://www.w3schools.com/xpath/ to try and understand how to write my statements to pull out the data i want correctly.
    I have read that sometimes the editor has problems if the XML contains namespace declarations, etc.
    Below is an example XML output where I'd like to be able to read the value in the ax211:success. My xpath gets prefix namespace errors as it doesn't recognize ax211.
    Xpath: /descendant::ns:validateCertificationResponse/child::ns:return/child::ax211:success
    Perhaps my xpath statement is just incorrect and wouldn't retrieve what i expect it to....
    Any advice is appreciated.
    Thanks,
    Kevin

    Hi,
    well, it appears that text() is automatically appended to the XPath query for some reason in UCCX, this is why you actually see the text node within the ax211:success element. This //*[local-name()="success"] select the whole node, not its first child (which is actually the first element, which also happens to be a text).
    Anyway,
    // - anywhere
    * - any node
    And within this "everything" you actually search with the condition within the angular brackets.
    G.

  • JAXBContext and unmarshaling xml document to a class that came from a jar.

    I'm trying to unmarshal, code:
                   try {
                        JAXBContext jc = JAXBContext.newInstance(clazz);
                        Unmarshaller m = jc.createUnmarshaller();
                        Document doc = XmlUtils.createDom(body);
                        javax.xml.bind.JAXBElement<T> res = (javax.xml.bind.JAXBElement<T>)m.unmarshal(doc);
                        return res.getValue();
                   } catch (JAXBException e) {
                        Log.exception(e);
    now i have an ObjectFactory inside the jar that resolve (xmlRegistry) the correct type.
    but the @XmlAccessorType(XmlAccessType.FIELD) binding is not working while the class is comming from a jar.
    when i 'Link source' to my project is working fine.
    I guess it has something to do with reflection.
    the class which i want to unmarshal to looks like this:
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "GetSessionIDResponseType", propOrder = {
    "sessionID"
    public class GetSessionIDResponseType
    extends AbstractResponseType
    implements Serializable
    private final static long serialVersionUID = 12343L;
    @XmlElement(name = "SessionID")
    protected String sessionID;
    * Gets the value of the sessionID property.
    * @return
    * possible object is
    * {@link String }
    public String getSessionID() {
    return sessionID;
    * Sets the value of the sessionID property.
    * @param value
    * allowed object is
    * {@link String }
    public void setSessionID(String value) {
    this.sessionID = value;
    not the field as u can see is protected though it has getter and setter.
    anyway i must get the link source project to a jar and i cant do that cause the unmarshal is basically failing.
    any idea?
    Edited by: 813927 on Nov 20, 2010 6:10 AM

    I've overcome the problem by adding the unmarsheling code inside the jar.
    though i dont the problem i tried to set the fields to be public and it didnt work.
    very strange so far.

  • Send and receiving XML documents out/into APO

    Hi all,
    We are on APO 5.0 and want to send our forecast from a planning book to a partner and also receive their data.
    Has anybody ever done this via XML?
    We are not planning to use ICH. But we have XI or could use Business Connector?
    Any response is appreciated! Thanks
    GM

    Hi,
    I would suggest you for XI with Proxy. Or either you can go for RFC but better is using proxy for communicating.
    Thanks,
    Prakash

  • Read xml-structure from a xml-document stored in a xmltype-column?

    Hello,
    I have several xml-documents stored in a table with a xmltype-column.
    Is it possible to read the structure of one xml-document? I need to know what data are exists in the xml-documents.
    I had read some hours here, but I dont find a suitable solution for that.
    To make a example, what I need:
    I have stored the following xml-document in the table:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="6">
    <EMPLOYEE_ID>105</EMPLOYEE_ID>
    <FIRST_NAME>David</FIRST_NAME>
    <LAST_NAME>Austin</LAST_NAME>
    <EMAIL>DAUSTIN</EMAIL>
    <PHONE_NUMBER>590.423.4569</PHONE_NUMBER>
    <HIRE_DATE>6/25/1997 0:0:0</HIRE_DATE>
    <JOB_ID>IT_PROG</JOB_ID>
    <SALARY>4800</SALARY>
    <MANAGER_ID>103</MANAGER_ID>
    <DEPARTMENT_ID>60</DEPARTMENT_ID>
    </ROW>
    </ROWSET>
    I need to return the following:
    ROWSET
    ...ROW
    ......EMPLOYEE NUMBER
    ......FIRST_NAME VARCHAR2
    ......DEPARTMENT_ID NUMBER
    Regards,
    Mark

    Hi,
    I was on a wrong way. The datatype is not stored in xml, this was a mistake from me.
    I needed something to printout some values from a xml-file. This xml-file was generated bei MS Excel. The data are in /Workbook/Worksheet/Table/Cell and I didnt know how to access it.
    I write for that the following:
    DECLARE
    v_xml XMLType;
    v_doc dbms_xmldom.DOMDocument;
    v_node dbms_xmldom.DOMNode;
    type t_values is table of varchar2(2000) index by binary_integer;
    v_values t_values;
    type t_table is table of t_values index by binary_integer;
    v_table t_table;
    procedure node_output (v_node in out dbms_xmldom.DOMNode)
    is
    v_nodelist1 DBMS_XMLDOM.DOMNodeList;
    v_nodelist2 DBMS_XMLDOM.DOMNodeList;
    v_anzahlnodes number;
    v_anzahlrows number;
    v_node_c dbms_xmldom.DOMNode;
    v_xmlmitarbeiterid number;
    begin
    v_nodelist1 := dbms_xmldom.GETCHILDNODES(v_node);
    v_anzahlrows := DBMS_XMLDOM.GETLENGTH(v_nodelist1);
    if v_anzahlrows = 0 or DBMS_XMLDOM.GETNODENAME(v_node) = 'Table'
    then
    if v_anzahlrows > 0
    then
    for i1 in 0..v_anzahlrows - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist1,i1);
    v_nodelist2 := dbms_xmldom.GETCHILDNODES(v_node);
    v_anzahlnodes := DBMS_XMLDOM.GETLENGTH(v_nodelist2);
    for i2 in 0..v_anzahlnodes - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist2,i2);
    v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node);
    v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node_c);
    v_values(i2) := DBMS_XMLDOM.GETNODEVALUE(v_node_c);
    end loop;
    v_table(i1) := v_values;
    end loop;
    for i1 in 1..v_anzahlrows - 1
    loop
    select SEQ_XMLMITARBEITER.nextval into v_xmlmitarbeiterid from dual;
    for i2 in 1..v_table(i1).count - 1
    loop
    dbms_output.put_line(v_table(i1)(i2));
    end loop;
    end loop;
    end if;
    else
    v_node := dbms_xmldom.GETFIRSTCHILD(v_node);
    for i in 0..v_anzahlrows - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist1,i);
    node_output(v_node);
    end loop;
    end if;
    end;
    BEGIN
    select inhalt into v_xml FROM xmlimport WHERE name = 'F23973/mitarbeiter.xml';
    v_doc := dbms_xmldom.newDOMDocument(v_xml);
    v_node:= dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(v_doc));
    node_output(v_node);
    END;
    This gives me all data from a xml-Excel-file. Is there a better way to do that? I have Oracle 10.2.
    Regards,
    Mark

Maybe you are looking for

  • File download is getting error while using popup

    Hi experts, Working in jdev 11.1.1.3.0, ADF BC with rich faces. I am downloading word document from ADF application, i am using fileDownloadActionListener it's working fine, but before opening any file if i invoke any popup, like in my case i have to

  • How to call or not call a Trigger in same table based on condition?

    Hi How to call or not call a Trigger in below situations.. If a table contains a record of same value i.e, [i[u]]ID 1 1 3 In above ID 1 is repeated for two times. In this situations i don't want to call a trigger.. But, the value ID is for 3, now i w

  • Unable to install os x (10.5.8) update from 10.5.4

    I've been trying to update my os from 10.5.4>10.5.8 with zero luck. After it apparently downloads restart occurs and once installation proceeds it freezes. I've tried leaving it for 20-30 minutes to see if that works-no avail. I've googled the proble

  • SQL Server 2000 and BPEL configuration issues

    I am attempting to get SQL Server 2000 to work with BPEL PM Server, and have followed a similar set of instructions as provided in a previously posted document regarding the switch from oracle lite to oracle production. I am following the OC4J route.

  • 2014.2 Random Crashes ntdll.dll

    Pretty consistent crashes of the version 2014.2  Always fault module name ntdll.dll This is happening on our desktop and laptop, on different projects.  It happens if we use the "Mercury Playback Engine" or the "Software Engine"  Both machine are onl