XML in Oracle 8.1.7

Hello,
I'm trying to insert (amongst other things) a decimal value from an XML file into a NUMBER column (where the precision and scale are unspecified) in an Oracle 8.1.7 database. I am attempting to do this with the java class OracleXML, but am having little joy - I get a java.lang.NumberFormatException error.
I can run this class, using the same XML file, against the same table in a 9i database without any problems. I can also manually insert this value into the 8i DB. I just cannot perform the XML upload to the 8i database. Any ideas???
Thanks,
Matt

Thanks.
I found that there's a tool - PLSXML :
http://otn.oracle.com/tech/xml/htdocs/plsxml/xml4plsql.htm

Similar Messages

  • New to XML and Oracle

    Just trying to clarify some issues as I try and learn about XML, and specifically how it integrates into the DB.
    1 - Is there a way with Oracle tools for me to get an XSD of an existing 9i relational schema? We are not currently using the XML DB, but our middleware developers would like to have an up to date XSD to use for their internal mapping.
    2 - Is there any way that I can keep that XSD up-to-date automatically, so I get a new one whenever the schema gets updated?
    3 - If I wanted to investigate storing XML docs within the DB in native XML format, I need to have an XML DB, correct? Is this DB construct maintained seperatelly from my "normal" relational schema? or are they kept in sync by Oracle?
    I know these may all be real basic questions, but as I said, I'm new to XML and Oracle. I am reading as much as I can, but there are a lot of docs out there.
    Thanks,
    Mike

    Hi
    1. On my opinion such a tool doesn't exists. Some parts can be implemented elsewhere, but not as described by you... e.g. with XSU if you specify the parameter "withschema" the XSD of the executed statement is generated. Another example is to use DBMS_METADATA to dump the data dictionary in XML (but not XSD, of course you could write your own XSLT to do this transformation...).
    2. -
    3. If you use XSD-based tables the XSD and the relational model are stored separately in the data dictionary. Therefore if you change the XSD you have to drop/create the XSD-based table... no schema evolution yet.
    Chris

  • 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

  • XML in Oracle 9i (best method to return a xml file from a table query)

    Hello.
    What is the best method to query a table, or set of tables (that will return thousands of rows) using xml in oracle? (best performance)
    I'm currently using DBMS_XMLGen, is there a better method ?

    I think, if your talking about generating XML, that you should use XMLElement, XMLForest, etc. to create your XML.
    Lets assume that you base is relational data, then maybe the following great example will give you an idea how to do it : Re: Generate XML Schema from oracle tables
    As michaels pointed out (did you read the link/ URL given?), the general expectancy is that the packages will be less and less important. So also maintenance wise the XMLElement, etc way will be the best, also for the future, maintainable method.

  • Nesting xml in Oracle 8i

    How to generate nested xml/ complex xml in Oracle 8i using 8i packages dbms_xmlquery or xmlgen .
    The xml might be looked like this..
    if any body have idea then pls let me know.
    i am trying to write Stored procedure on that i am using query like select c1,c2, cursor(c3,c4 from xyb) from ABC
    but not getting required output
    <?xml version="1.0" ?>
    - <File>
    <File_Type>ETNL_TRAVELR_PAYMENTS</File_Type>
    - <File_Header_Record>
    <File_Format_Version>0002</File_Format_Version>
    <Creation_Module />
    </File_Header_Record>
    - <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    - <Transaction_Header>
    <Record_Number>1</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    - <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF DOM EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    - <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    - <Amounts>
    - <Transaction_Amount>
    <Amount>154.00</Amount>
    <Currency>GBP</Currency>
    </Transaction_Amount>
    </Amounts>
    - <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    - <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>K</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D562</Account_ID>
    </Account>
    </Bank_Account>
    - <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>K</Code_Type>
    - <Code>
    - <![CDATA[ 538111
      ]]>
    </Code>
    </Bank_Route_Code>
    - <Bank_Address_Info>
    - <Name>
    - <![CDATA[ Natwest
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Long Sutton Branch
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ 25 market Place
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Spalding
      ]]>
    </City>
    <Country>GB</Country>
    </Bank_Address_Info>
    </Bank>
    - <Account>
    - <Account_Number>
    - <![CDATA[ 12345678
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ John Doe
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ EmployeeCity
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>CF375YL</Postal>
    <Country>GB</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    - <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000999
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    - <Comments>
    - <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    - <References>
    - <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021004001542
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    + <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    + <Transaction_Header>
    <Record_Number>2</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    + <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF DOM EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    + <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    - <Amounts>
    - <Transaction_Amount>
    <Amount>46.00</Amount>
    <Currency>EUR</Currency>
    </Transaction_Amount>
    </Amounts>
    - <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    - <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>G</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D202</Account_ID>
    </Account>
    </Bank_Account>
    - <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>G</Code_Type>
    - <Code>
    - <![CDATA[ 234543
      ]]>
    </Code>
    </Bank_Route_Code>
    - <Bank_Address_Info>
    - <Name>
    - <![CDATA[
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[
      ]]>
    </Street2>
    - <City>
    - <![CDATA[
      ]]>
    </City>
    <Country />
    </Bank_Address_Info>
    </Bank>
    - <Account>
    - <Account_Number>
    - <![CDATA[ DE65100700000123456789
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ Test User
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Berlin
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>1234323</Postal>
    <Country>DE</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    - <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000888
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    - <Comments>
    - <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    - <References>
    - <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021101001053
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    + <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    + <Transaction_Header>
    <Record_Number>3</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    + <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF INTL EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    + <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    + <Amounts>
    + <Transaction_Amount>
    <Amount>265.00</Amount>
    <Currency>EUR</Currency>
    </Transaction_Amount>
    </Amounts>
    + <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    + <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D202</Account_ID>
    </Account>
    </Bank_Account>
    + <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    - <Code>
    - <![CDATA[
      ]]>
    </Code>
    </Bank_Route_Code>
    + <Bank_Address_Info>
    - <Name>
    - <![CDATA[
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[
      ]]>
    </Street2>
    - <City>
    - <![CDATA[
      ]]>
    </City>
    <Country />
    </Bank_Address_Info>
    </Bank>
    + <Account>
    - <Account_Number>
    - <![CDATA[ NL02ABNA0123456789
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ New User
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Ansterdam
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>34242</Postal>
    <Country>NL</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    + <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000777
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    + <Comments>
    + <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    + <References>
    + <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021101001025
      ]]>
    </Reference_Value>
    </Reference>
    + <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    + <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    + <Transaction>
    <Transaction_Type>FT_TRANS_IMP</Transaction_Type>
    - <Transaction_Header>
    <Record_Number>4</Record_Number>
    <Urgent>N</Urgent>
    </Transaction_Header>
    - <Model_Info>
    - <Model_ID>
    - <![CDATA[ FF INTL EXT PAY
      ]]>
    </Model_ID>
    </Model_Info>
    - <Transfer_Info>
    <Charges>15</Charges>
    </Transfer_Info>
    - <Amounts>
    - <Transaction_Amount>
    <Amount>34.70</Amount>
    <Currency>EUR</Currency>
    </Transaction_Amount>
    </Amounts>
    - <Dates>
    <Trusted_Source>N</Trusted_Source>
    <Value_Date />
    </Dates>
    - <Bank_Account>
    <Bank_Account_Type>DR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    </Bank_Route_Code>
    </Bank>
    - <Account>
    <Account_ID>D202</Account_ID>
    </Account>
    </Bank_Account>
    - <Bank_Account>
    <Bank_Account_Type>CR</Bank_Account_Type>
    - <Bank>
    - <Bank_Route_Code>
    <Code_Type>S</Code_Type>
    - <Code>
    - <![CDATA[
      ]]>
    </Code>
    </Bank_Route_Code>
    - <Bank_Address_Info>
    - <Name>
    - <![CDATA[
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[
      ]]>
    </Street2>
    - <City>
    - <![CDATA[
      ]]>
    </City>
    <Country />
    </Bank_Address_Info>
    </Bank>
    - <Account>
    - <Account_Number>
    - <![CDATA[ FR313000400828000123456789
      ]]>
    </Account_Number>
    - <Account_Address_Info>
    - <Name>
    - <![CDATA[ French User
      ]]>
    </Name>
    - <Street1>
    - <![CDATA[ Employee Addr1
      ]]>
    </Street1>
    - <Street2>
    - <![CDATA[ Employee Addr2
      ]]>
    </Street2>
    - <City>
    - <![CDATA[ Paris
      ]]>
    </City>
    <Country_Sub_Entity />
    <Postal>54333</Postal>
    <Country>FR</Country>
    </Account_Address_Info>
    </Account>
    </Bank_Account>
    - <Payment_Details_Or_Addenda>
    - <Details_Text>
    - <![CDATA[ PAY OHRID: 100000666
      ]]>
    </Details_Text>
    </Payment_Details_Or_Addenda>
    - <Comments>
    - <Comment_Text>
    - <![CDATA[ NONE
      ]]>
    </Comment_Text>
    </Comments>
    - <References>
    - <Reference>
    <Reference_Type>FBNF</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ INVOICE 20021101001481
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type />
    - <Reference_Value>
    - <![CDATA[
      ]]>
    </Reference_Value>
    </Reference>
    - <Reference>
    <Reference_Type>FMAILEN</Reference_Type>
    - <Reference_Value>
    - <![CDATA[ [email protected]
      ]]>
    </Reference_Value>
    </Reference>
    </References>
    </Transaction>
    - <File_Trailer_Record>
    <File_Name>ETNL_TRAVELR_PAYMENTS</File_Name>
    <Total_Records>4</Total_Records>
    </File_Trailer_Record>
    </File>
    regards
    Ramashankar Sahu

    As I recall from my 8i days (it's been many years), the only way to do this is to install the XML XDK. From http://www.oracle.com/technology/tech/xml/xdk/xdk_java.html, it says "The Oracle9i versions of the XDK can also be used to build applications designed to interface with Oracle8i databases." I had thought the 10g version could do that as well but I'm not seeing it now.
    Since XMLType was not part of 8i, you will need to use PL/SQL to take your Select statement results and build them into a DOMDocument structure.
    Hope that helps.

  • Generating multi-level xml in oracle

    Hi,
    I want to create a multi-level XML structure from oracle, is there a way?
    Presently oracle provides DBMS_XMLQUERY and XMLGEN package to generated XML structure given a query. But the structure so generated is of single level. That is say I use
    select XMLGEN.getXML('select * from employees') from dual;
    the output is
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <TEL>451-638191</TEL>
    </ROW>
    </EMPLOYEE>
    That I call a single level output.
    To create a multiple level XML I went in for object type in oracle. But the problem with this is that if I want to have multiple children for a single parent then object types fail. The structure below is not possible with object type.
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <CONTACT>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fifth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>451-638191</ROW>
         <ROW>451-638192</ROW>
         <ROW>451-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fouth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>452-638191</ROW>
         <ROW>452-638192</ROW>
         <ROW>452-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    </CONTACT>
    </ROW>
    </EMPLOYEE>
    Then I tried nested tables. Here one needs to create an object type to create a table type. One cannot create a table type out of another table type. So that leavs me with 2 levels
    object type
    used by
    table type
    used by
    table.
    Presently to generated a multi-level output as shown above I'm using cursors and build it in a clob variable.
    Is there any other way that one can build a multi-level structure. Or is there a build in package that comes with orace 8i (and higher).
    Regards,
    Milton.

    Milton,
    I was able to generate hierarchical XML from Oracle using object views and XML-SQL Utility (XSU).
    Here is a simplified version of my OR schema:
    /* Physical spec object */
    create or replace type physical_specifications_object as object (
    physical_specifications_id number(15),
    page_count number(10),
    product_id number(10),
    four_color_count number(10),
    two_color_count number(10),
    table_count number(10),
    binding_type varchar2(100),
    height varchar2(20),
    width varchar2(20)
    /* Market object */
    create or replace type market_object as object (
    market_id number(15),
    master_class_name varchar2(50),
    market_name varchar2(100),
    market_type varchar2(100),
    market_description varchar2(500),
    level_rank varchar2(15),
    market_code varchar2(100),
    product_id number(10)
    /* List of markets */
    create or replace type market_table as table of market_object;
    /* Market object view */
    create or replace view market_object_view of market_object
    with object identifier (market_id) as
    select mkt.market_id,
    class.master_class_name,
    mkt.market_name,
    mkt.market_type,
    mkt.market_description,
    prod_mkt.level_rank,
    mkt.market_code,
    p.product_id
    from market mkt,
    product p,
    product_market prod_mkt,
    master_class class
    where p.product_id = prod_mkt.product_id
    and prod_mkt.market_id = mkt.market_id
    and mkt.master_class_id = class.master_class_id(+);
    /* Feature object */
    create or replace type product_feature_object as object (
    feature_id number(15),
    feature_text varchar2(3500),
    feature_type varchar2(100)
    /* List of features */
    create or replace type product_feature_table as table of product_feature_object;
    /* Product object */
    create or replace type product_object as object (
    product_id number(10),
    title varchar2(150),
    media_type varchar2(20),
    standard_number varchar2(100),
    physical_specifications physical_specifications_object,
    markets market_table,
    product_features product_feature_table
    /* Product object view */
    create or replace view product_object_view of product_object
    with object identifier (product_id) as
    select p.product_id,
    p.title,
    p.media_type,
    p.standard_number,
    physical_specifications_object(spec.physical_specifications_id,
    spec.page_count,
    spec.product_id,
    spec.four_color_count,
    spec.two_color_count,
    spec.table_count,
    spec.binding_type,
    spec.height,
    spec.width),
    cast(multiset(select *
    from market_object_view mkt
    where mkt.product_id(+) = p.product_id) as market_table) as markets,
    cast(multiset(select f.feature_id, f.feature_text, f.feature_type
    from feature f
    where f.product_id = p.product_id) as product_feature_table) as product_features
    from product p,
    physical_specifications spec
    where p.product_id = spec.product_id(+)
    The objective is to generate XML for a product list with all the product subelements. The simple query "select * from product_object_view" when fed to the XML-SQL utility generates multi-level SQL. Note that Oracle 8i allows up to two level collection nesting in object types. Oracle 9i removes this limitation.
    Check XSU documentation at http://otn.oracle.com/docs/tech/xml/xdk_java/doc_library/Production9i/doc/java/xsu/xsu_userguide.html#1014886
    Hi,
    I want to create a multi-level XML structure from oracle, is there a way?
    Presently oracle provides DBMS_XMLQUERY and XMLGEN package to generated XML structure given a query. But the structure so generated is of single level. That is say I use
    select XMLGEN.getXML('select * from employees') from dual;
    the output is
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <TEL>451-638191</TEL>
    </ROW>
    </EMPLOYEE>
    That I call a single level output.
    To create a multiple level XML I went in for object type in oracle. But the problem with this is that if I want to have multiple children for a single parent then object types fail. The structure below is not possible with object type.
    <EMPLOYEE>
    <ROW num="1">
    <NAME>Mark</NAME>
    <CONTACT>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fifth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>451-638191</ROW>
         <ROW>451-638192</ROW>
         <ROW>451-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    <ROW>
    <RESIDENCE>
    <ADDRESS>
         <ROW>
         Fouth Avenue, New York
         </ROW>
    </ADDRESS>
    <TEL>
         <ROW>452-638191</ROW>
         <ROW>452-638192</ROW>
         <ROW>452-638193</ROW>
    </TEL>
    </RESIDENCE>
    </ROW>
    </CONTACT>
    </ROW>
    </EMPLOYEE>
    Then I tried nested tables. Here one needs to create an object type to create a table type. One cannot create a table type out of another table type. So that leavs me with 2 levels
    object type
    used by
    table type
    used by
    table.
    Presently to generated a multi-level output as shown above I'm using cursors and build it in a clob variable.
    Is there any other way that one can build a multi-level structure. Or is there a build in package that comes with orace 8i (and higher).
    Regards,
    Milton.

  • Using XML in Oracle

    Good Morning!
    I wanted to insert some xml Data into my Orcale XML DB:
    First of all I registered 2 Schemas required for the XML, like this:
    Begin
    DBMS_XMLSCHEMA.registerSchema(
    schemaURL => 'Mailpiece_Processing/oif_dtypes',
    schemaDoc => bfilename('XML_TEST','oif_dtypes.xsd'));
    End;
    then Created a table:
    Create table XML_default auf XMLType
    then inserted XML like this:
    insert into xml_default
    values
    XMLTYPE
    Bfilename ('XML_TEST', 'Test.xml'),
    nls_charset_id('AL32UTF8'
    Now to my question: Oracle is offering more than one possebility to save XML into its DB. If I import XML like this, is it called CLOB Storage or object relational?
    Thanks in advance
    runkel

    Hi ,
    I can only give u a few examples here but for the full sytanx and features of this powerful feature u may have to refer to some documentation online or read a book on XML within Oracle Database.
    Let me try a few examples here
    1) To extract the data from XML document an SQL plus command is available in XML DB. This feature is available from 10G onwards
    example : select xmlelement(name,ename) from emp
    Output will look like
    <NAME>SMITH </NAME>
    <NAME> JOHN </NAME>
    <NAME> JONES </NAME>
    2) CREATE TABLE FAMILIES (F_ID NUMBER(3), F_XML XMLTYPE);
    insert into families values(1,xmltype('<XML.....>'));
    or
    insert into families values(1,''<XML>......' ));
    Hope this helps !!!
    Regards
    Faiz

  • Oracle  - Using XML in Oracle/ SORRY double Post

    SORRY for double Post!
    Good Morning!
    I wanted to insert some xml Data into my Orcale XML DB:
    First of all I registered 2 Schemas required for the XML, like this:
    Begin
    DBMS_XMLSCHEMA.registerSchema(
    schemaURL => 'Mailpiece_Processing/oif_dtypes',
    schemaDoc => bfilename('XML_TEST','oif_dtypes.xsd'));
    End;
    then Created a table:
    Create table XML_default auf XMLType
    then inserted XML like this:
    insert into xml_default
    values
    XMLTYPE
    Bfilename ('XML_TEST', 'Test.xml'),
    nls_charset_id('AL32UTF8'
    Now to my question: Oracle is offering more than one possebility to save XML into its DB. If I import XML like this, is it called CLOB Storage or object relational?
    Thanks in advance
    runkel
    Message was edited by:
    user623693
    Message was edited by:
    user623693

    Hi ,
    I can only give u a few examples here but for the full sytanx and features of this powerful feature u may have to refer to some documentation online or read a book on XML within Oracle Database.
    Let me try a few examples here
    1) To extract the data from XML document an SQL plus command is available in XML DB. This feature is available from 10G onwards
    example : select xmlelement(name,ename) from emp
    Output will look like
    <NAME>SMITH </NAME>
    <NAME> JOHN </NAME>
    <NAME> JONES </NAME>
    2) CREATE TABLE FAMILIES (F_ID NUMBER(3), F_XML XMLTYPE);
    insert into families values(1,xmltype('<XML.....>'));
    or
    insert into families values(1,''<XML>......' ));
    Hope this helps !!!
    Regards
    Faiz

  • XML in Oracle Database

    Hi Gurus,
    I would like to learn about XML in Oracle database 10g.
    Where can I get examples and supporting documents?
    Thanks and Regards,
    Forms.

    Hmm...
    Here are few links ->
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96620/toc.htm
    http://www.oracle.com/technology/tech/xml/index.html
    Other than this you can also check the following ->
    http://www.psoug.org/reference/xml_functions.html
    http://www.psoug.org/reference/dbms_xmlgen.html
    Regards.
    Satyaki De.

  • Generating multi-level XML in Oracle 8i using XML-SQL utility

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

  • Working with xml in Oracle

    Hi All,
    I am new to programming with XML in Oracle.
    Please help me with this requirement.
    Please consider a sample data
    <BSGDocs><Doc Id='562' Archive='1'></Doc><Doc Id='563' Archive='0'></Doc></BSGDocs> from this clob data I need to extract the doc_id and archive values and insert into a new table
    here it should return
    Doc_id Archive
    562 1
    563 0
    Please let me know How I can achieve this.
    Thanks & Regards,
    Vikas

    Just add INSERT INTO your-table:
    select  id,
            archive
      from  XMLTable(
                     '/BSGDocs/Doc'
                     passing XMLType(Q'[<BSGDocs><Doc Id='562' Archive='1'></Doc><Doc Id='563' Archive='0'></Doc></BSGDocs>]')
                     columns
                       id varchar2(5) path '@Id',
                       archive varchar2(5) path '@Archive'
    ID    ARCHIVE
    562   1
    563   0
    SQL> SY.

  • Oracle application 12.1.3 - XML Gateway, Oracle Transportation Execution

    Hi,
    we are going to use Oracle application 12.1.3, I wan to know if the XML Gateway, Oracle Transportation Execution are still available in this release or replace by any other technology/module? Please let me know.
    -Thanks,
    PV

    OTA is still available in this release.

  • Where i can find examples to load data xml in oracle xmldb?

    hello, where i can find examples to load data xml in oracle xmldb, i don´t have much experience.
    thanks

    there are many ways to do this. but the final solution will be basd on your requirment.
    look through the oracle documentation
    "Oracle 9i XML Database Developers Guide- OracleXMLDB"
    for details and if it is not clear pls post your requirement in this forum.

  • Variablize the datatypes in the select of data from XML to Oracle

    Hi All,
    I'm new to XML to Oracle data integration. I do have clob column that has the XML data and trying to bring it into the Oracle relational tables, as a part of it we are developing PL/SQL procedure that calls this CLOB column, I want to know if we can variablize the data types ( Just like tablename.columnname%type) in the select of the XML data:
    select v.instrid, v.endtoendid, v.txid, v.cd, v.ccy,
    replace(v.intrbksttlmamt,'.',',') as intrbksttlmamt, v.chrgbr, v.bic1, v.nm1, v.adrline11, v.adrline12, v.ctry1, v.iban1,
    v.bic2, v.bic3, v.nm2, v.adrline21, v.adrline22, v.ctry2, v.iban2, v.cdtrref, v.addtlrmtinf
    from the_data w,
    xmltable(xmlnamespaces(default 'urn:iso:std:iso:20022:tech:xsd:pacs.008.001.01'),
    '/Document/pacs.008.001.01/CdtTrfTxInf'
    passing xmltype(w.the_column)
    columns instrid varchar2(300) path 'PmtId/InstrId',
    endtoendid varchar2(150) path 'PmtId/EndToEndId',
    txid varchar2(200) path 'PmtId/TxId',
    cd varchar2(50) path 'PmtTpInf/SvcLvl/Cd',
    ) v
    As you see above in the bold I do define the data types after every column name , the problem is incase there is change in datatype I do need to manually edit the procedure to change the datatype is there a way I can variablize them something like tablename.columname%type.
    Any answers are greatly appreciated.

    Two questions:
    1. Does your database have a version number?
    SELECT * FROM v$version;2. Why are you storing XML in a CLOB column rather than one of XMLType?

  • XML From Oracle

    I would like to have a stored function return a CLOB field that is an XML DOM Tree that I can build from a cursor... Does anyone have some baseic information of hopw t oget this started. I have not installed any Java support into Oracle yet. Right now I have a new 8.1.7 database.
    Thank you
    null

    You can use the XMLGEN package that comes with the XML SQL Utility, or use the XML SQL Utility's OracleXMLQuery class in a Java Stored Procedure of your own creation to accomplish this.
    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

  • Problem while using XML with Oracle

    I have a problem using XML with oracle applications
    The process I am following
    1. Making a XML string.
    2. Parsing it to get a document
    3. Free the parser using xmlparser.freeparser
    4. Traversing through nodes .
    5. Freeing the document.
    The whole Process is executed in batch mode.
    The problem occurs after executing the procedure for 5000 records and I get the error
    ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
    heap","library cache")
    Can you please help me out to overcome this problem
    It's urgent
    I have
    Oracle version 8.1.7.0.0
    XML version 1.2
    OS Windows NT
    To resolve the problem I have increase shared memory size and java initialization parameters ,which seems OK
    Looking forward for your answer.

    Hello, Reena
    Your process flow seems to be correct in term of getting/freeing memory.
    Following error
    The problem occurs after executing the procedure for 5000 records and I get the error
    ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
    heap","library cache")may be caused by memory leaks in xdk or memory fragmentation(due to get/free memory cycle)
    To find out if this is an memory leak issue you could try to monitor V$SGASTAT from one session while running your batch process in another session.
    To prevent (or lower its impact) fragmentation issues try to PIN objects, and adjust java_pool_size and shared_pool_reserved_size.
    Anyway, counsult your Oracle DBA.
    Oracle version 8.1.7.0.0I think, you should apply database patch first of all. The latest one (8.1.7.4.x) could be accured from Metalink.

Maybe you are looking for

  • How to get multipe data set values from Decision Table.

    Hi All, I need to use SAP BRM for one of the scenario where based one some Code Group I need to get a set of questions and for each question a set of possible answers. The structure of Decision Table will be like below : Table 1 : To get set of quest

  • How to install Windows 8 from flash drive

    So I want to install Windows 8 via a flash drive .  But I don't know how to do it because when I go through the bootcamp setup it asks for a disk. So is there some software to trick my computer into thinking that my flashdrive is actually a disk?

  • Show number of new photos with faces found

    Photos should show a number of new photos with faces found on each face at faces page. This would help me not to go over every person and check for new photos.

  • IOS7 Problem

    I am having problems with Internet access only since I updated my IPAD mini to iOS7.  Does anyone know how to fix it or get help from Apple?  Thanks

  • My Shuffle Won't Shuffle

    I have a Shuffle that will play just fine in the "play in order" position, but when I switch to the "shuffle songs" position, nothing happens (no light, no sound). I tried restoring it, but I got the same results. Does anyone have any suggestions? Of