View XML / HTML  Documents Stored in Oracle DB

I need to build an application where a user can enter in basic query criteria and I need to return the appropriate XML (transformed by a specified XSL stylesheet) or static HMTL document stored as XMLTYPE or CLOB in the DB. Is it feasible to build such an application in Apex or do I need to build a JSP based application?
Any other options?
Thanks,
Chris

It is quite feasible (and quite easy) to do this via XMLDB. You can even create an Oracle Text index on the XML (or binary for Word documents, pdf etc) for fast case insensitive searching. Look at the XMLDB documentation, especially the sql access to the resource_view.
Mike

Similar Messages

  • Safari won't open webarchives or html documents stored on computer

    I occasionally save a webpage to my computer as a .webarchive for later usage, but anytime I try to open them safari takes me to a completely different page. It brings me to my Top Sites page that shows all of my most frequently visited pages. I don't understand why safari would do this since the way the document is created is by saving the page directly in safari (command + S). I noticed the problem initially when Safari wouldn't open an html document that I had created and stored on my computer. I used the page as my homepage because it had links to all of my most frequent websites and because I liked having my own creation as my home page (that doesn’t really matter, though) and then out of nowhere when I opened safari my homepage had been changed to Yahoo (my default engine) and the html document wouldn’t open at all. I thought that maybe the problem was due to a recent update because I noticed that two new tabs were added to the toolbar (ebay and amazon), but I don’t understand why an update would make it so that .webarchive files, created by safari, wont open. I checked my safari version, it is 7.0.3, and if it helps, the html documents that won't open were made with Adobe Dreamweaver. I would really appreciate if someone could tell me what is happening because I do need to be able to open the .webarchive files I have saved in the past. Thank you.

    Carolyn, I've told you repeatedly, that site's instructions are crap. They absolutely do not fully remove the Genieo adware. In fact, the uninstaller that site refers you to will actually install components of the adware that were not already present! For the same reason, it makes no sense to rely on Genieo's instructions. I am completely mystified as to why you continue to post these suggestions.
    To properly remove Genieo, see:
    http://www.thesafemac.com/arg-genieo/
    (Fair disclosure: The Safe Mac is my site, and contains a Donate button, so I may receive compensation for providing links to The Safe Mac. Donations are not required.)

  • Viewing a HTML document in my Java program

    Hi,
    My Java program has a JTextPane that can display plain text or HTML documents. This program can mark up certain parts of the document to draw the user's attention.
    However, I am having problems when it comes to marking up some of the HTML documents. When they are first loaded onto the JTextPane, they appear fine. When I then run the method to apply the mark up styles, I notice that the text turns the same color as the background after a certain point - making it impossible to see the document or markup.
    The HTML (or text) document on display is made into a StyledDocument. And this is how the View for the HTML documents is created:
    HTMLEditorKit htmledkit = new HTMLEditorKit();
    ViewFactory myHTMLViewFactory = htmledkit.getViewFactory();
    return myHTMLViewFactory.create(elem);
    Note that elem is an Element -.-
    - I tried modifying the color tags in the HTML document, but even when I made the text black and the background white, the text still goes white. If it's a black background, the text goes black, etc. The markup style is actually trying to turn parts of the text red - and it works almost all of the time, apart from these certain documents.
    - I then tried applying my own style whenever a HTML document is loaded in, in the hope that I could force the background white and text black, regardless of the tags:
    MutableAttributeSet att = new SimpleAttributeSet();
    StyleConstants.setForeground(att,Color.black);
    StyleConstants.setBackground(att, Color.white);
    doc.setCharacterAttributes(0, doc.getLength(), att, false);
    The resulting document display kept the original HTML background color, but wherever there was text it looked like someone had run a highlighter over it to change the background white and text black. Kinda ugly! And it still didn't work - come markup time this style was ignored after a certain point.
    - This is one of the HTML documents that causes the problem:
    <html>
    <head>
         <link rel="STYLESHEET" type="text/css" href="mystyle.css">
         <title>My Document</title>
    </head>
    In the body tag:
    <table>
    table here... this displays fine
    </table>
    And here is the problem point:
    <table width=100% cellspacing=0 cellpadding=0>
    <tr>
    <td>
    <table width=100% cellspacing=0 cellpadding=0 style="padding: 3px; padding-top: 6px; padding-bottom: 6px;">
    <tr>
    <td width=100% style=" padding-left: 6px; padding-right: 6px;">
    <table class=pane cellpadding=0 cellspacing=0>
    <tr>
    <td width=100% class=panetitlebox align=Center >
    This is the last text that gets displayed! After this sentence, text goes same color as background.
    </td>
    </tr>
    <tr height=100% valign=top>
    <td class=panebox colspan=2 align=Left style="padding: 0px; border: solid 1px; border-top: none;">
    <table width=100% cellspacing=0 cellpadding=0>
    <tr>
    <td class=content align=Left style="padding: 4px; background: transparent;">
    <b>Bold text that doesn't show</b> More text that doesn't show
    And so on....
    In the header tag of another HTML document that has the same problem, it says it is HTML version 4.0. I have looked up the Java API and found that the javax.swing.text.html package is still 'migrating' towards HTML 4.0 and only supports HTML version 3.2. (Even in the API for Java 1.5 beta, although I use Java 1.4.2)
    So I assume that Java just can't handle my documents! I also think that most of these HTML documents were generated by a program (I think I saw Frontpage in one of the document's meta tags), because when I make my own HTML it doesn't have the problem.
    But it would be nice if my Java program can support these documents, so does anyone have any suggestions as to how I could get these documents to display properly once I apply mark up styles?
    If I haven't explained something properly, I will clarify as it is a complicated program, and I've been driving myself crazy with this problem for several days!

    I was looking through the HTML document removing pieces of code to see where the problem was. I removed all code relating to styles, alignment, width, padding etc, with no luck. The document has several tables, many of them nested, so I added some comments to see where each started and ended. After I added the comments, I checked the document in my Java program again, ran the mark up styles, and it suddenly worked! So I removed each comment one by one, checking each time, until I found the one that made it work. I then tried typing in the same spot, adding an extra space, moving the <tr> tag onto the same line, but only the HTML comment made it work. Here is the part of the document where I added the comment (it's in bold)
    This is the last text that gets displayed! After this
    sentence, text goes same color as background.
    </td>
    </tr>
    <tr height=100% valign=top>
    <td class=panebox colspan=2 align=Left style="padding:
    0px; border: solid 1px; border-top: none;">
    <table width=100% cellspacing=0 cellpadding=0> <!-- This comment makes the document display fine after markup -->
    <tr>
    <td class=content align=Left style="padding: 4px;
    background: transparent;">
    <b>Bold text that doesn't show</b> More text that
    doesn't showDoes anyone know WHY this is happening? It's so weird. I thought if it was something more obvious, like styles, I could just get my program to remove them when reading in the document. But added HTML comments????
    Thank you ^_^

  • Can't view XML Publisher document from JDeveloper environment

    Something has happened to my JDeveloper environment so that I can no longer view XML/BI Publisher output in the JDeveloper runtime web pages. I have developed pages using both DocumentHelper.getOutputURL and TemplateHelper.processTemplate functions. At rutime I am getting an error logged like:
    java.io.FileNotFoundException: \usr\tmp\xdoxxxxxxxxxxx.fo (The system cannot find the path specified)
    However, when I actually deploy and run the pages in EBS they seem to work fine.
    I'm guessing it's some sort of configuration problem with my OC4J server but can't seem to find the details anywhere.
    Thanks for any help you can give me.
    --Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I got this issue resolved. I was missing xdo_doc_display.jsp in my local /OA_HTML directory. Also, I had to create a directory, C:\usr\tmp (I still don't know where that is being set).
    Anyway, thanks to all who tried to help.
    --Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • XML and Images stored in Oracle 8i

    I have been able to store images within an acle 8i database using both LONG RAW and OrORDSYS.ORDIMGB datatypes. I can use Forms and Reports to access these datatypes but now wish to include them in WEB products such as XSQL or PL/SQL.
    Using XSQL I only see the image code - how can I turn it back into an image to display on my WEB page?.
    Will iFS be the next logical solution so that a pointer is stored in my table to the image in the file system?
    null

    DBMS_XMLQuery was introduced with Oracle 9i
    as you can read here.
    http://download-west.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89852/pwnew.htm#969685
    That means in order to use this functionality you need to upgrade your database to 9i

  • XML forms show content of HTML document

    Hi all,
    I want to show the content of a html document stored on portal KM in the SHOW form. Can this be done? The user can browse in the EDIT form to this html document and store its path. By using a label I can only show the document path or make a link to the document. I'm unable to show the docs content.
    How can this be done?
    Thanks,
    Frederik

    I think this could be done by directly editing the XSL.  Unfortunately making changes this ways renders the forms unmanagable because you'll lose your changes when you try to use the forms builder after making your changes.
    As for how you can actually do this in XSL, you'll probably have to research that more to be sure.  I think you can use a document() function, but I'm not really an XSL pro. 

  • HTML document in portal

    Dear friends,
    I got an issue like, my client need to put their HTML document into the portal, its around 300 files. So how to put htis html document into portal. Is it possible to put the html document or not, If not how to make appear HTML document in portal.
    Kindly help me
    Regards
    Suresh

    hi
    first you need upload the html files int oKM content then you need  to create a iviews  based on this content present in KM content
    step 1: uploading the html files
    go to content administration->KMcontent->at the right hand side select the document folder->
    here u create a new folder by selecting folder menu->new->folder
    then your folder will be created under documents folder
    doble click on this (now you under documents/your folder path)
    under you folder
    select folder menu->new->upload
    give  name(ex new.html ),description, and select browse to upload the file
    follow the same procedure for all the html files
    this indicates the u have uploaded all the files properly
    now creating a ivews based on the html documents uploaded in KM content
    content administration->portal content->select your folder->right click ->new->iview->select KM document iview template->give iview name &id etc
    then open the iview for editing
    there u can find a property called " path to document" give the value as " \document\<your folder name where u uploaded the html files under KM content>\file name(ex:new.html>
    like that u can create all the iviews based on the html documents stored under km content
    rgds
    srinivas

  • Reading an XML file stored in Oracle

    Is it possible to read an xml file stored in Oracle via Oracle methods?

    If by "read" you mean "read as text", then you can just select the document as a CLOB and return it.
    If by "read" you mean "read and parse", then you can use the Oracle XML Parser for PL/SQL to parse the CLOB into a DOM structure.
    My Building Oracle XML Applications book has lots of examples of doing this, but especially in chapter 5, "Processing XML with PL/SQL".
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • XML Parsing in Java Stored Proc--Oracle XML Support Installation?

    I am working with a third party product that is having difficulty running a java stored proc that is parsing a supplied XML file. The proc basically looks like:
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    InputStream is = getXMLAsInputStream(xml);
    try {
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse( is );
    ... parse the document ....
    catch (FactoryConfigurationError e) {
    // unable to get a document builder factory
    We are running on 9.2.0.6, HP-UX 64-bit. At first, when we would attempt to run the proc, a database hang would occur; now after attempting to install using loadjava jars for xerces2.6: ORA-29532: Java call terminated by uncaught Java exception:
    javax.xml.parsers.FactoryConfigurationError: Provider
    org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found)
    The vendor says that the errors we are getting when running are not due to any dependency on xerces or jre1.4, and that we need to "install Oracle XML support", but I'm not certain what this means (I cannot find any documentation on what to install). I believe that there are jars that need to be loaded into the database to support the XML parsing, as jre1.3 does not include built-in XML support, and Oracle 9.2.0.6 uses jre1.3.
    So...does anyone have any thoughts as to how to resolve the missing references? Is there a way to "install Oracle XML support", or is it to install the necessary jars?
    Thanks,
    Candi

    Candi,
    The following resources should be of help:
    Oracle9i Database Release 2 (9.2) Documentation Library
    In particular, check out the following:
    Java Developer's Guide
    Java Stored Procedures Developer's Guide
    XML API Reference - XDK and Oracle XML DB
    XML Database Developer's Guide - Oracle XML DB
    XML Developer's Kits Guide - XDK
    If that doesn't help, then try the following:
    OracleJVM and Java Stored Procedures
    XML Technology Center
    Good Luck,
    Avi.

  • 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

  • The size of a XML document stored in a XMLType table

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

  • Modifying MS WORD documents stored in BLOBS. (Oracle 9i Release 9.2.0.4.0)

    I have a need to replace a string of characters in an MS Word document that is stored in a BLOB field in an Oracle 9i database.
    Background: We have a large number of MS Word documents (~50,000) and many of them contain links to other Word documents stored on various servers throughout our network. We are moving a number of these servers, thus invalidating these links. I need to be able to update these links without having to open up every one of these documents and doing it manually.
    Is it possible, using PL/SQL, to update these links in these MS Word documents that are stored in Oracle? I have currently written a quick PL/SQL routine that will find the links and provide their location within the document, but I am not sure how I can update them. The problem, as I see it, is that if the characters that I am replacing differ in length than those that are currently in the existing document, then I would have to shift the remaining bytes of the document either left or right to preserve the integrity of the document.
    Is this possible, or should I pursue another option?

    It does not have to manual, but I think you will need to use word to modify and save the documents.
    The most automated process I can think of would be to write a client program to fetch a blob, run word, and have a word macro or add in to make the edits save, and then the client program updates with the new blob.
    With that number of documents, I would probably try to fetch a bunch of blobs and have word process them all before updating them for performance reasons.
    Unfortunately I would have no clue how to do the word automation, but I wouldn't touch those blobs using pl/sql

  • Getting attributes from a XML File, stored in Oracle

    Hello,
    my problem is the following
    I have a xml file that looks like that:
    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
    <root path="H:\musik">
    <directory name="Bj�rk - Homogenic" path="H:\musik\Bj�rk - Homogenic">
    <file album="Homogenic" artist="Bjoerk" comment=""
    completename="Bjoerk - Hunter" genre="Techno"
    name="01 - Hunter.mp3"
    path="H:\musik\Bj�rk - Homogenic\01 - Hunter.mp3"
    title="Hunter" year="1997"/>
    <file album="Homogenic" artist="Bjoerk" comment=""
    completename="Bjoerk - Joga" genre="" name="02 - Joga.mp3"
    path="H:\musik\Bj�rk - Homogenic\02 - Joga.mp3" title="Joga" year="1994"/>
    </directory>
    <directory name="Blank & Jones - In Da Mix" path="H:\musik\Blank & Jones - In Da Mix">
    <file album="In da Mix" artist="Blank & Jones" comment=""
    completename="Blank & Jones - On a journey (Intro)"
    genre="Dance" name="01 - On a journey (Intro).mp3"
    path="H:\musik\Blank & Jones - In Da Mix\01 - On a journey (Intro).mp3"
    title="On a journey (Intro)" year="1999"/>
    <file album="In da Mix" artist="Blank & Jones" comment=""
    completename="Blank & Jones - Cream" genre="Dance"
    name="02 - Cream.mp3"
    path="H:\musik\Blank & Jones - In Da Mix\02 - Cream.mp3"
    title="Cream" year="1999"/>
    </directory>
    </root>
    This file I have stored in Oracle as table of XML Type.
    Now I have build a little Java Programm, that displays the XML File like the File structure in the Windows Explorer.
    I want, when I choose a file in the File structure, that the ID3 Informations like album artist a.s.o. can be displayed. My problem is, I couldn't get these informations e.g. in an array from the database. Any suggestions how I could realize this in Java?
    Thx for any comments
    Max

    Try this:
    select extract(xmltypefieldname, '//xpath/field@attribute').getStringVal() from yourtable where yourwhereclause
    You can also select elements that match certain attributes by using a predicate such as field[@attr = myval][@attr2 = myval2]...
    Hope this helps.

  • How to view HTML document through ABAP in CRM

    Hi,
    I have an internal table with one field type string containing html code.
    How can i see the output of that html document in SAP CRM using ABAP code.
    Is there any standard function module to display the document by passing the internal table?
    Please help.
    Regards
    Kiran

    you can use cl_gui_htmlviewer control to do this.
    check the demo program
    SAPHTML_DEMO1
    RSDEMO_HTML_VIEWER
    or you can use dynamicdocuments for the same check out samples programs in package
    SDYNAMICDOCUMENTS
    Regards
    Raja

  • Viewing HTML documents

    If I am downloading an HTML document from the WWW, i.e. a web page, how can I handle it so that what is actually shown on my GUI component (which is of type TextArea) is the final "page" (as shown by any standard Web browser) rather than just html code?

    Check out JEditorPane

Maybe you are looking for