Store XML on Oracle and perform search

Hi,
I need to be able to store 10,000 XML documents in Oracle so
I can performance attribute search against these documents
Is Oracle 8i a must? Is relational tables the way to go?
What would a good way to store XML document and retrieve them.
We are currently storing them as BLOB, where we can't do
preform searching functionality.
Many Thanks.
Kevin
null

Oracle XML Team wrote:
: Kevin Lu (guest) wrote:
: : Hi,
: : I need to be able to store 10,000 XML documents in Oracle so
: : I can performance attribute search against these documents
: : Is Oracle 8i a must? Is relational tables the way to go?
: : What would a good way to store XML document and retrieve
them.
: : We are currently storing them as BLOB, where we can't do
: : preform searching functionality.
: : Many Thanks.
: : Kevin
: 8i is the way to go but interMedia's support of XML attribute
: searching is not in the current release but has been announced
: for 8.1.6.
I posted this as a follow-up a previous query but, I need to
accomplish the same. That is store XML data in CLOB but search
(and select rows) based on XML element or attribute values of the
XML documents in the CLOB column. Where can I learn more about
the InterMedia search. Thanks again.
Prasad
null

Similar Messages

  • How to store data from xml in oracle database

    Hello All
    Could anyone tell me ways of storing XML in Oracle and whats the best one in terms of performance issues.
    any URL to this q/s would be great.
    thanks
    kedar

    Ben,
    The following link as some information regarding DOM API and XSQL.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2923508047773696280::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:17309127931717
    For XML DB, you may want to create an XMLSchema and build a table off the schema definition. Then use WEBDAV to load the xml into a folder (ie object table) Once the xml is in the database you could build a view for a relational look at the data.
    Example from XMLDB Techical White Paper doc.
    create or replace view PURCHASEORDER_MASTER_VIEW
    (reference, requestor, userid, costcenter,...)
    as select extractValue(Value(p),'/PurchaseOrder/Reference'),
    extractValue(value(p),'/PurchaseOrder/Requestor'),
    extractValue(value(p),'/PurchaseOrder/User'),
    extractValue(value(p),'/PurchaseOrder/CostCenter'),...
    from PURCHASEORDER p

  • How to store XML and search within tags

    My question
    ===========
    exactly what steps do you need follow to take an XML doc, store
    it, and query based on a tag value.
    The 8i Intermedia text option Reference refers to
    XLM_SECTION_GROUP feature. However, no examples are given. There
    is no user guide.
    I searched Oracle's website and found one reference to
    XML_SECTION_GROUP. The example given is a single row insert into
    a CLOB column with a single pair of tags.
    This whitepaper gives an example of an XML doc, and a query on
    it:
    XML Support in Oracle8i and Beyond
    November 9, 1998
    It doesn't list the steps in between storing the doc and quering
    it. This is crucial to the whole thing: does XML_SECTION_GROUP
    allow all nested tags below the top level to be sectioned and
    indexed implicitly? Or do you need to tell Oracle about all the
    tags you are interested in, in which case what value is added by
    the XLM_SECTION_GROUP?
    Does Oracle have some better examples on this?
    Below is text cut and pasted from the whitepaper.
    -----------x---------
    Figure 5: InsuranceClaim Mixes Structured Data and Text
    <?xml version="1.0"?>
    <InsuranceClaim>
    <ClaimID>12345</ClaimID>
    <LossCategory>7</LossCategory>
    <Settlements>
    <Payment>
    <Payee>Borden Real Estate</Payee>
    <Date>12-OCT-1998</Date>
    <Amount>200000</Amount>
    <Approver>JCOX</Approver>
    </Payment>
    </Settlements>
    <DamageReport>
    A massive <Cause>Fire</Cause> ravaged the building
    and
    <Casualties>12</Casualties> people were killed.
    Early
    FBI reports indicate that <Motive>arson</Motive> is
    suspected.
    </DamageReport>
    </InsuranceClaim>
    Once instances of iFS file types (including XML-based ones) are
    stored in the database, their
    content can be searched using standard SQL queries, and these
    files can be organized, browsed,
    and versioned using familiar tools like the Windows Explorer.
    So an insurance agent sees a
    directory of InsuranceClaim files sheFs recently worked on in
    the field, while an
    InsuranceClaim-processing application developer can work with
    the information in the
    InsuranceClaim in any way he needs to.
    XML-Enabled "Section Searches" in ConText
    Any XML documents or document fragments saved into "text blobs"
    in the database can be
    enabled for indexing by Oracle8i InterMediaFs ConText
    text-search engine. ConText has been
    enhanced for Oracle8i to allow developers to pinpoint their
    searches to a particular section of a
    document, where sections are implicitly defined by the XML tags
    in the document (fragment).
    Since ConText is seamlessly integrated into the database and
    the SQL language, developers can
    use SQL to perform queries that involve both structured data
    and indexed document fragments.
    For example, Figure 6 shows the SQL statement you would write
    to search one million
    Insurance Claims in your database to answer the question, "How
    much money has Jim Cox
    approved to date in settlement payments for arson-related fire
    claims? "
    Figure 6: Searching on a Column & Text in XML
    Sections
    SELECT SUM(Amount)
    FROM Claim_Header ch,
    Claim_Settlements cs,
    Claim_Settlement_Payments csp
    WHERE csp.Approver = 'JCOX'
    AND CONTAINS (DamageReport, 'Arson WITHIN Motive') >
    0
    AND CONTAINS (DamageReport, 'Fire WITHIN Cause' ) >
    0
    AND . . . /* Join Clauses */
    null

    Geoff Ingram (guest) wrote:
    : My question
    : ===========
    : exactly what steps do you need follow to take an XML doc,
    store
    : it, and query based on a tag value.
    : The 8i Intermedia text option Reference refers to
    : XLM_SECTION_GROUP feature. However, no examples are given.
    There
    : is no user guide.
    : I searched Oracle's website and found one reference to
    : XML_SECTION_GROUP. The example given is a single row insert
    into
    : a CLOB column with a single pair of tags.
    : This whitepaper gives an example of an XML doc, and a query on
    : it:
    : XML Support in Oracle8i and Beyond
    : November 9, 1998
    : It doesn't list the steps in between storing the doc and
    quering
    : it. This is crucial to the whole thing: does XML_SECTION_GROUP
    : allow all nested tags below the top level to be sectioned and
    : indexed implicitly? Or do you need to tell Oracle about all
    the
    : tags you are interested in, in which case what value is added
    by
    : the XLM_SECTION_GROUP?
    : Does Oracle have some better examples on this?
    : Below is text cut and pasted from the whitepaper.
    : -----------x---------
    : Figure 5: InsuranceClaim Mixes Structured Data and Text
    : <?xml version="1.0"?>
    : <InsuranceClaim>
    : <ClaimID>12345</ClaimID>
    : <LossCategory>7</LossCategory>
    : <Settlements>
    : <Payment>
    : <Payee>Borden Real Estate</Payee>
    : <Date>12-OCT-1998</Date>
    : <Amount>200000</Amount>
    : <Approver>JCOX</Approver>
    : </Payment>
    : </Settlements>
    : <DamageReport>
    : A massive <Cause>Fire</Cause> ravaged the building
    : and
    : <Casualties>12</Casualties> people were killed.
    : Early
    : FBI reports indicate that <Motive>arson</Motive> is
    : suspected.
    : </DamageReport>
    : </InsuranceClaim>
    : Once instances of iFS file types (including XML-based ones)
    are
    : stored in the database, their
    : content can be searched using standard SQL queries, and
    these
    : files can be organized, browsed,
    : and versioned using familiar tools like the Windows
    Explorer.
    : So an insurance agent sees a
    : directory of InsuranceClaim files sheFs recently worked on
    in
    : the field, while an
    : InsuranceClaim-processing application developer can work
    with
    : the information in the
    : InsuranceClaim in any way he needs to.
    : XML-Enabled "Section Searches" in ConText
    : Any XML documents or document fragments saved into "text
    blobs"
    : in the database can be
    : enabled for indexing by Oracle8i InterMediaFs ConText
    : text-search engine. ConText has been
    : enhanced for Oracle8i to allow developers to pinpoint their
    : searches to a particular section of a
    : document, where sections are implicitly defined by the XML
    tags
    : in the document (fragment).
    : Since ConText is seamlessly integrated into the database and
    : the SQL language, developers can
    : use SQL to perform queries that involve both structured data
    : and indexed document fragments.
    : For example, Figure 6 shows the SQL statement you would
    write
    : to search one million
    : Insurance Claims in your database to answer the
    question, "How
    : much money has Jim Cox
    : approved to date in settlement payments for arson-related
    fire
    : claims? "
    : Figure 6: Searching on a Column & Text in XML
    : Sections
    : SELECT SUM(Amount)
    : FROM Claim_Header ch,
    : Claim_Settlements cs,
    : Claim_Settlement_Payments csp
    : WHERE csp.Approver = 'JCOX'
    : AND CONTAINS (DamageReport, 'Arson WITHIN Motive') >
    : 0
    : AND CONTAINS (DamageReport, 'Fire WITHIN Cause' ) >
    : 0
    : AND . . . /* Join Clauses */
    Currently you cannot break apart an arbitrary XML doc and store
    it into the database without using XSLT to create DDL to insert
    it. You can create a schema and have XML be read and written to
    it. Check out the XML SQL Utility available here for download.
    As for the section searching, in 8.1.5 you can only get section
    searching not hierarchical searches. interMedia in this version
    doesn't understand the XML structure. This will come in 8.1.6.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Store XML data as relational data into Oracle tables using Java and XMLType

    I want to store xml data into an Oracle 11g table as relational storage, not as CLOB or Binary storage. Then I should also be able to query and fetch this data from table into an XML file.
    Any hint on how to write java code using XMLType to achieve this?
    Any help would be appreciated.

    Thanks for the explanation. I still have few confusions. I will try to elaborate my requirement with a simple example...
    I have the following xsd and xml files. "note" would be the table in database and "to", "from", "heading" and "body" would be the columns of note table. "Tove", "Jan", "Reminder" and "Don't forget me this weekend!" would go as data in one row of note table.
    How do I create note table with the xml schema (xsd file)?
    Should the note table be of XMLType or the columns?
    How do I load the XML data into the columns of note table?
    How do I retrieve the row of note table as XML file?
    XML Schema:
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.xxxxx.com"
    xmlns="http://www.xxxxx.com"
    elementFormDefault="qualified">
    <xs:element name="note">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="to" type="xs:string"/>
          <xs:element name="from" type="xs:string"/>
          <xs:element name="heading" type="xs:string"/>
          <xs:element name="body" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    XML Data:
    <?xml version="1.0"?>
    <note>
      <to>Tove</to>
      <from>Jan</from>
      <heading>Reminder</heading>
      <body>Don't forget me this weekend!</body>
    </note>

  • Oracle Open World 2012 - XML DB Presentations and Hands-on Labs

    Hereby following up on a small tradition, I think, I get going since 2006...an agenda overview of all things XMLDB you can do or see during this years Oracle Open World.
    Oracle Open World is the biggest IT conference nowadays in the world with 40.000+ thousand attendees and 1600+ sessions or workshops, so an overview regarding specific topics can be handy.
    If there is an update or something needs correction or added, please post it here.
    Regards
    Marco Gralike
    HOL10055 - Oracle XML DB Hands-On Lab
    ========================================================================================================================
    This hands-on lab provides an introduction to using Oracle XML DB and XQuery to store and manage XML content stored in Oracle Database.
    It introduces the different kinds of XML storage and indexing offered by Oracle XML DB and shows how to optimize XQuery operations on XML
    content by selecting the correct storage and indexing model. The lab also provides an introduction to the XML features available in the latest
    version of Oracle Database, including the new XQuery Update standard. And it shows how to take full advantage of the latest XQuery standards,
    such as XQuery Full-Text, to develop applications that combine the power of Full-Text and XML-based indexes
    BOF9908 - Oracle XML DB BOF
    ========================================================================================================================
    This session provides you with an opportunity to get answers to your questions about Oracle XML DB from the development team, product
    management team, acknowledged independent experts, and fellow Oracle XML DB users. The goal is to have an open and frank discussion
    about how to get the best out of all the features of Oracle XML DB. The session gives you a chance to establish personal contact with the
    people who have firsthand experience with developing and delivering systems that make use of Oracle XML DB
    CON8443 - Simple Content Management with Oracle XML DB and Database Native Web Services
    ========================================================================================================================
    This session demonstrates the power of the Oracle XML DB repository. You will learn how to automate the processing of documents stored
    in the Oracle XML DB repository, using repository events, and how to combine XML, PL/SQL, and database native Web services with Ajax and
    JavaScript to create simple, effective applications that leverage the full power of Oracle XML DB and the Oracle XML DB repository. The session
    focuses on a sample application, called XFiles, and shows how it was created with a combination of XML, XSL, JavaScript Ajax, and PL/SQL
    CON8440 - Managing XML Content with the Latest-Generation Oracle XML DB
    ========================================================================================================================
    This session introduces the latest generation of Oracle XML DB technology. XML standards continue to evolve, and Oracle XML DB continues
    to provide the industry’s leading implementation of those standards. The latest version of Oracle XML DB provides support for two new exciting
    XML standards, XQuery-Update and XQuery-Full Text. You will learn how to use XQuery, XQuery-Update, and XQuery Full-Text to develop
    powerful XML-centric applications. The session also demonstrates how to optimize XQuery Full-Text operations with Oracle’s new XML full-text
    index. The presentation also introduces Oracle’s new midtier XQuery engine and the XQJ API, which enables Java developers to access the full
    power of Oracle’s XML technology
    CON3148 - Integrating XML by Using Oracle SQL Developer 3.1 and Oracle Database 11g Release 2
    ========================================================================================================================
    Frequently during a project lifecycle, new technology is introduced that presents first-time challenges. This session describes a project using
    Oracle XML Database (Oracle XML DB) and discusses why Oracle XML DB was chosen, how it was used, and the technical issues encountered.
    The presentation covers several examples using XMLTYPE, CLOBs, Oracle XML DB methods, XMLAGG, XMLELEMENT, XMLFOREST, and
    dbms_xmldom. You will learn about methods, design considerations, and issues with Oracle XML DB. You will also take home working examples
    that you can copy and paste into your Oracle environment. Benefit from examples that use Oracle Database 11g Release 2 and Oracle SQL
    Developer 3.1.
    CON8442 - Design Guidelines and Performance Tuning for Storing XML in Oracle Database
    ========================================================================================================================
    This session examines techniques that can be used to optimize the performance of XML processing in Oracle XML DB. It looks at the different
    storage and indexing options and provides guidelines on when each should be considered. After establishing a framework for deciding how to
    store XML, the presentation considers the options available for indexing XML to ensure optimal performance of an XML-based application.
    The session also discusses how standard techniques such as partitioning and using parallel data manipulation language (PDML) can be used to
    scale XML processing on extremely large volumes of XML content and how Oracle XML DB can leverage the intelligent storage capabilities of
    Oracle Exadata.
    DEMOGROUNDS (Moscone South)
    XML Application Development: Oracle XML DB, Oracle XML Developer Kit
    ========================================================================================================================
    Oracle XML Database provides a high-performance, native XML storage and retrieval technology. It fully absorbs the W3C XML data model into
    the Oracle Database, and provides new standard access methods for navigating and querying XML. With Oracle XML Database, you get all the
    advantages of relational database technology plus the advantages of XML. Come and learn how to develop applications that take advantage
    of Oracle's XML technology and the Oracle XML DB Repository.
    Oracle XML Database: Structured, Semistructured, and Unstructured XML
    ========================================================================================================================
    Oracle XML Database provides a high-performance, native XML storage and retrieval technology. It fully absorbs the W3C XML data model into
    the Oracle Database, and provides new standard access methods for navigating and querying XML. With Oracle XML Database, you get all the
    advantages of relational database technology plus the advantages of XML. Come and learn how to develop applications that take advantage
    of Oracle's XML technology and the Oracle XML DB Repository.Oracle's OOW 2012 Content Catalog: https://oracleus.activeevents.com/connect/search.ww?event=openworld (use "XML DB" or "XMLDB" as search tag)
    Edited by: user10212268 on Aug 13, 2012 5:10 AM

    Other resources are also on linkedin http://www.linkedin.com/groups/Oracle-XMLDB-3282943 to keep you updated.
    M.

  • Write / store xml data in Xe and retrieve stored data using pl/sql

    Hi to all,
    i'm searching a tutorial on:
    A - how to write / store xml data in Xe and retrieve stored data using pl/sql
    I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
    I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
    1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
    Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
    Thanx

    Thank you very much Carl,
    However my fault is that i've not tried to create the table via sql plus.
    Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
    however with a ddl script like the following the table was created successfully.
    create table example1
    keyvalue varchar2(10) primary key,
    xmlcolumn xmltype
    Thank you very much for your link.
    Message was edited by:
    Marcello Nocito

  • [Oracle 11g] Store filename as VARCHAR2 and its content as XMLType

    Hi all,
    The version of Oracle used is 11.2.0.3.0.
    I would like to load a XML file into a table from AIX with a Shell script.
    Here is the test case table:
    ALTER  TABLE mytable DROP PRIMARY KEY CASCADE;
    DROP   TABLE mytable CASCADE CONSTRAINTS;
    CREATE TABLE mytable (
       filename VARCHAR2 (50 BYTE),
       created DATE,
       content SYS.XMLTYPE,
       CONSTRAINT pk_mytable PRIMARY KEY (filename) USING INDEX
    XMLTYPE content STORE AS BINARY XML;The problem is to store the the file name too.
    So I add a step to create the control file from a generic one like this:
    #!/bin/ksh
    FILES=$(sample.xml)
    CTL=generic.CTL
    for f in $FILES
    do
        cat $CTL | sed -e "s/:FILE/$f/g" > $f.ctl
        sqlldr scott/tiger@mydb control=$f.ctl data=$f
        rc=$?
        echo "Return code: $rc."
    doneThe filename and the data are stored in the table, but I get this error message after executing the Shell script:
    SQL*Loader: Release 11.2.0.3.0 - Production on Mon Jun 11 13:42:21 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    SQL*Loader-275: Data is in control file but "INFILE *" has not been specified.
    Commit point reached - logical record count 64And here is the content of the log file:
    SQL*Loader: Release 11.2.0.3.0 - Production on Mon Jun 11 14:13:43 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    SQL*Loader-275: Data is in control file but "INFILE *" has not been specified.
    Control File:   sample.ctl
    Data File:      sample.xml
      Bad File:     sample.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table MYTABLE, loaded from every logical record.
    Insert option in effect for this table: APPEND
       Column Name                  Position   Len  Term Encl Datatype
    FILENAME                                                  CONSTANT
        Value is 'sample.xml'
    CONTENT                           DERIVED     *  EOF      CHARACTER
        Dynamic LOBFILE.  Filename in field FILENAME
    Record 2: Rejected - Error on table MYTABLE.
    ORA-00001: unique constraint (PK_MYTABLE) violated
    Record 3: Rejected - Error on table MYTABLE.
    ORA-00001: unique constraint (PK_MYTABLE) violated
    Record 4: Rejected - Error on table MYTABLE.
    ORA-00001: unique constraint (PK_MYTABLE) violated
    Record 5: Rejected - Error on table MYTABLE.
    ORA-00001: unique constraint (PK_MYTABLE) violated
    and so on...
    Record 52: Rejected - Error on table MYTABLE.
    ORA-00001: unique constraint (PK_MYTABLE) violated
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table MYTABLE:
      1 Row successfully loaded.
      51 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                   1664 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:            64
    Total logical records rejected:        51
    Total logical records discarded:        0
    Run began on Mon Jun 11 14:13:43 2012
    Run ended on Mon Jun 11 14:13:43 2012
    Elapsed time was:     00:00:00.23
    CPU time was:         7586:56:08.38It seems that the control file try to insert as many rows than the number of lines in the file sample.xml !!!
    So, I cannot check if load is done correctly since return code is allways 2!
    Is it the correct way to solve my problem ?
    What can I do to get it better ?

    Another question !
    Here is an other way of doing it.
    #!/bin/ksh
    FILEPATH=./data/sample.xml
    FILENAME=$(basename ${FILEPATH})
    CTLFILE=load_data.ctl
    cat > ${CTLFILE} <<EOF
    LOAD DATA
    INFILE *
    INTO TABLE mytable APPEND
        filename CONSTANT "${FILEPATH}",
        created "SYSDATE",
        content LOBFILE (filename) TERMINATED BY EOF
    BEGINDATA
    ${FILEPATH}
    EOF
    sqlldr scott/tiger@mydb control=${CTLFILE}
    rc=$?
    echo "Return code: $rc."I've tested this script, it's okay.
    Now I want to store the basename of the file : ${FILENAME}.
    How can I do that ?
    The problem is that I can no more write "LOBFILE (filename)" because it does not point to the correct path of the file !!!
    Someone can help me please ?
    Thanks.

  • Trying to store XML documents in Oracle XML repository using Java

    Hi,
    I am trying to store XML documents in Oracle XML Repository using a Java program. i just need a functionality to be able to store XML files and retrieve them.
    Can anybody PLEASE provide me some sample code.
    Thanks in Advance
    Sasha

    Did you ever get any samples on doing this and if so could you pass it on to me.
    Thanks

  • How to store XML data into Oracle Table

    I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is:
    C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml
    <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2263)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
    at testInsert.main(testInsert.java:8)
    Here is my xml file:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    </ROW>
    <ROW num="2">
    <DEPTNO>20</DEPTNO>
    <DNAME>RESEARCH</DNAME>
    <LOC>DALLAS</LOC>
    </ROW>
    <ROW num="3">
    <DEPTNO>30</DEPTNO>
    <DNAME>SALES</DNAME>
    <LOC>CHICAGO</LOC>
    </ROW>
    <ROW num="4">
    <DEPTNO>40</DEPTNO>
    <DNAME>OPERATIONS</DNAME>
    <LOC>BOSTON</LOC>
    </ROW>
    </ROWSET>
    and here is structure of table:
    Name Null? Type
    DEPTNO NOT NULL NUMBER(2)
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    and here is my Java Code:
    import java.sql.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert{
         public static void main(String[] args) throws SQLException{
              Connection conn = getConnection();
              OracleXMLSave sav = new OracleXMLSave(conn,"scott.tmp_dept");
              sav.insertXML(args[0]);
              sav.close();
              conn.close();
         private static Connection getConnection()throws SQLException{
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@amt-ebdev01:1521:mydept","scott","tiger");
              return conn;
    Could you help me ? Thanks !

    The problem is that you need to pass avalid URL , Document...
    Please try this code instead:
    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert
    public static void main(String[] args) throws SQLException{
    Connection conn = getConnection();
    OracleXMLSave sav = new OracleXMLSave(conn,"scott.temp_dept");
    URL url = createURL(args[0]);
    sav.insertXML(url);
    sav.close();
    conn.close();
    private static Connection getConnection()throws SQLException{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dlsun1982:1521:jwxdk9i","scott","tiger");
    return conn;
    // Helper method to create a URL from a file name
    static URL createURL(String fileName)
    URL url = null;
    try
    url = new URL(fileName);
    catch (MalformedURLException ex)
    File f = new File(fileName);
    try
    String path = f.getAbsolutePath();
    // This is a bunch of weird code that is required to
    // make a valid URL on the Windows platform, due
    // to inconsistencies in what getAbsolutePath returns.
    String fs = System.getProperty("file.separator");
    if (fs.length() == 1)
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    url = new URL(path);
    catch (MalformedURLException e)
    System.out.println("Cannot create url for: " + fileName);
    System.exit(0);
    return url;

  • Oracle Secure Enterprice Search and Webcenter?

    Hi!
    Im trying to build a search page in a content based webcenter (11g) portal where I have all the content in the UCM
    I could do it by crawls the content server, but if I do I dont have any good referense to which page the content is displayed on and SES returns parts of the contributor data file xml as well and it would be very nice to get rid of that whitout building a function to open data files and get the actual content.
    Is there any way to crawl the site as a site instead like google or bing would have done?
    Regards, Ralf

    It says:
    "Note:
    Oracle WebCenter Spaces includes the additional Oracle SES crawler that indexes Spaces, lists, pages, and people resources in WebCenter Spaces. This crawler is not supported in WebCenter Portal applications."
    So its not posible to crawl a site build with WebCenter Portal (not using spaces)?

  • In Adobe Bridge, how can I display keywords in their hierarchy, do an "aka" keyword assignment, and perform multi-value keyword searches?

    Hi Bridge Geniuses!
    I need your help. I am using Bridge to sort and keyword a pretty big photo archive. I have created a pretty long nested hierarchy (4 layers deep, max) and, for a few reasons, would like the parent tags to be automatically included when I indicate a sub-tag.  The problem I have now is that the keyword list is distractingly long and organized alphabetically. My first question is this: is there a preference setting in Bridge that will ask the program to display the keywords in their hierarchy? That is, will Bridge present the list as, for example, cars à hybrids à Toyotas à Prius. 
    My second question is: if I have two or more names that represent the same keyword, is there an “aka” function in this program that will allow me to direct searches for two or more different words to the same keyword entry? (For example, if I want my searches for “Bruce Wayne” to also show entries marked as “Batman.”)
    Finally, I would like to know if Bridge will perform keyword searches for more than one word at a time. So far, I have tried entering two keywords with overlap at a time, separated by a space or a comma or a semicolon, and the search comes up empty.
    Thank you very much for your help!

    I reset my custom workspace and all seems to be well now. My keywords now show, the number of photos each applies to and I can again search.
    Thank you.

  • Safari is not working on the Mac. Internet is fine, mail, App Store etc all working and connecting to Internet fine. Done the latest software update, still not working. When selecting a web address from bookmarks or typing in search bar, partial blue bar.

    Safari is not working on the Mac. Internet is fine. mail, App Store etc all working and connecting to Internet fine. Done the latest software update, still not working. When selecting a web address from bookmarks or typing in search bar, partial blue bar only and coloured wheel appears.

    From the Safari menu bar, select
    Safari ▹ Preferences ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
    If you wish, you may be able to salvage the malfunctioning extension by uninstalling and reinstalling it. That will revert its settings to the defaults.
    If extensions aren't causing the problem, see below.
    Safari 5.0.1 or later: Slow or partial webpage loading, or webpage cannot be found

  • The search function in the itunes store does not work.  It will accept a request and suggest searches but then it locks up and will not search.  Clicking on the magnifying glass or a suggested search does nothing.  Re-installing itunes has not helped.

    The search function in the itunes store does not work.  It will accept a request and suggest searches but then it locks up and will not search.  Clicking on the magnifying glass or a suggested search does nothing.  Re-installing itunes has not helped.

    everything you stated here is exactly what i have done and have got nowhere. i have windows 7 64 bit on a hp 8 g of ram desktop. im also looking for help

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • Using Oracle Text to search through WORD, EXCEL and PDF documents

    Hello again,
    What I would like to know is if I have a WORD or PDF document stored in a table. Is it possible to use Oracle Text to search through the actual WORD or PDF document?
    Thanks
    Doug

    Yes you can do context sensitive searches on both PDF and Word docs. With the PDF you need to make sure they are text and not images. Some scanners will create PDFs that are nothing more than images of document.
    Below is code sample that I made some time back to demonstrate the searching capabilities of Oracle Text. Note that the example makes use of the inso_filter that is no longer shipped with Oracle begging with Patch set 10.1.0.4. See metalink note 298017.1 for the changes. See the following link for more information on developing with Oracle Text.
    http://download-west.oracle.com/docs/cd/B14117_01/text.101/b10729/toc.htm
    begin example.
    -- The following needs to be executed
    -- as sys.
    DROP DIRECTORY docs_dir;
    CREATE OR REPLACE DIRECTORY docs_dir
    AS 'C:\sql\oracle_text\documents';
    GRANT READ ON DIRECTORY docs_dir TO text;
    -- End sys ran SQL
    DROP TABLE db_docs CASCADE CONSTRAINTS PURGE;
    CREATE TABLE db_docs (
    id NUMBER,
    format VARCHAR2(10),
    location VARCHAR2(50),
    document BLOB,
    CONSTRAINT i_db_docs_p PRIMARY KEY(id)
    -- Several notes need to be made about this anonymous block.
    -- First the 'DOCS_DIR' parameter is a directory object name.
    -- This directory object name must be in upper case.
    DECLARE
    f_lob BFILE;
    b_lob BLOB;
    document_name VARCHAR2(50);
    BEGIN
    document_name := 'externaltables.doc';
    INSERT INTO db_docs
    VALUES (1, 'binary', 'C:\sql\oracle_text\documents\externaltables.doc', empty_blob())
    RETURN document INTO b_lob;
    f_lob := BFILENAME('DOCS_DIR', document_name);
    DBMS_LOB.FILEOPEN(f_lob, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.LOADFROMFILE(b_lob, f_lob, DBMS_LOB.GETLENGTH(f_lob));
    DBMS_LOB.FILECLOSE(f_lob);
    COMMIT;
    END;
    -- build the index
    -- Note that this index differs than the file system stored file
    -- in that paramter datastore is ctxsys.defautl_datastore and not
    -- ctxsys.file_datastore. FILE_DATASTORE is for documents that
    -- exist on the file system. DEFAULT_DATASTORE is for documents
    -- that are stored in the column.
    create index db_docs_ctx on db_docs(document)
    indextype is ctxsys.context
    parameters (
    'datastore ctxsys.default_datastore
    filter ctxsys.inso_filter
    format column format');
    --search for something that is known to not be in the document.
    SELECT SCORE(1), id, location
    FROM db_docs
    WHERE CONTAINS(document, 'Jenkinson', 1) > 0;
    --search for something that is known to be in the document.  
    SELECT SCORE(1), id, location
    FROM db_docs
    WHERE CONTAINS(document, 'Albright', 1) > 0;

Maybe you are looking for

  • Active Cost Centers

    Req : List of active cost centers in a month. I tried doing this : ECC -  Table CSKS - Contents <b>CostCenter|ValidTo|ValidFrom</b> AKST1|09/01/1999|07/31/2009 AKST2|08/31/2007|09/31/2007 AKST3|06/31/2007|09/31/2008 AKST4|12/31/2007|07/31/2010 Valid

  • Why are you ignoring customer complaints about the Podcasts app?

    This app is horrible. All the iTunes reviews list the same problems. Either episodes won't download, they won't play, or they won't sync. I know it's a free app, but we all paid for our iPhones or iPads. I've seen no answers and no helpful updates. W

  • FPGA Boolean Size in Memory

    LabVIEW stores booleans as a U8 in memory according to the article. http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/how_labview_stores_data_in_memory/ My question is what happens when you develop in FPGA? Specifically if I made 8 lookup

  • Will the iphone ever get bigger in size

    I ve had the iphone 3gs, and now the 4s.  I love the phone and how smooth and reliable it is, but my hands are getting way to small for this phone. my thumbs are cramping up. I guess you can compare to being SHAQ using an iphone. thats how small it i

  • Installation problems - Leopard installer doesn't recognise harddrive

    I've installed a new drive in my Macbook Pro and am facing some problems installing 10.5 Leopard. Specs of stuff are: Machine: Macbook Pro 2.4 15.4in (Late 2007) New drive: Western Digital Scorpio Blue 320Gb Old drive: Fujitsu 160Gb (original drive)