Importing XML to Oracle
Hi,
I would like to import XML data into Oracle 10g
I have already done tests using SQL Loader or DBMS_XMLSAVE and I have no problem to import into a single table.
Example:
University table in Oracle:
Id Number(2)
Name Varchar(20)
and the following XML file:
<University>
<Id>1</Id>
<Name>A</Name>
</University>
<University>
<Id>2</Id>
<Name>B</Name>
</University>
So I have no problem to import this data in the table University
The problem is how to import in multiple tables:
Example: let's add the Students table:
StudentId Number(2)
StudentName Varchar(20)
UniversityId Number(2) (fk)
and the XML file is:
<University>
<Id>1</Id>
<Name>A</Name>
<Student>
<StudentId>100</StudentId>
<StudentName>Jack</StudentName>
</Student>
<Student>
<StudentId>200</StudentId>
<StudentName>Jo</StudentName>
</Student>
</University>
<University>
<Id>2</Id>
<Name>B</Name>
<Student>
<StudentId>25</StudentId>
<StudentName>John</StudentName>
</Student>
<Student>
<StudentId>230</StudentId>
<StudentName>Mike</StudentName>
</Student>
</University>
How can I import this data in the University and Students tables using Sql Loader or DBMS_XMLSave?
Thanks for your help.
null
Try the XML DB
Note it has a FAQ thread at the top full of useful information.
Similar Messages
-
Importing XML into oracle 11g database
I am having some difficulty parsing an XML file into oracle 11g database.
Currently using Oracle 11g Express Edition (XE)
Here is how my XML file looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <AccountMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Accounts>
- <AccountMapping>
<AccountID>0000000000000-000</AccountID>
<AccountName>XLS</AccountName>
<AccountType>Excel</AccountType>
<AccountOwner>System</AccountOwner>
</AccountMapping>
- <AccountMapping>
<AccountID>0000000000000-001</AccountID>
<AccountName>XLSS</AccountName>
<AccountType>Excel2</AccountType>
<AccountOwner>System2</AccountOwner>
</AccountMapping>
- <AccountMapping>
and so on the file continues.. I have the xml file saved on my local hard disk
I have created a package in SQL Developer
create or replace
PACKAGE XML_FILEHANDLER AS
type TRecord is record (
Account_ID varchar2(100)
, AccountName varchar2(100)
, AccountType varchar2(30)
, AccountOwner varchar2(100)
type TRecordTable is table of TRecord;
function getRows (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipelined;
END XML_FILEHANDLER;
-- BODY
create or replace
PACKAGE BODY XML_FILEHANDLER AS
function getRows (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipelined AS
nb_rec NUMBER := 1;
tmp_xml CLOB;
tmp_file CLOB;
rec TRecord;
BEGIN
dbms_lob.createtemporary(tmp_file, true);
tmp_file := dbms_xslprocessor.read2clob(p_directory, p_filename);
rec.Account_ID := regexp_replace(tmp_file, '.*<Account_ID>(.*)</Account_ID>.*', '\1', 1, 1, 'n');
rec.AccountName := regexp_replace(tmp_file, '.*<AccountName>(.*)</AccountName>.*', '\1', 1, 1, 'n');
rec.AccountType := regexp_replace(tmp_file, '.*<AccountType >(.*)</AccountType >.*', '\1', 1, 1, 'n');
rec.AccountOwner := regexp_replace(tmp_file, '.*<AccountOwner>(.*)</AccountOwner>.*', '\1', 1, 1, 'n');
loop
-- this regexp finds occurrence(s) of this pattern : "<?xml ... ?><root_tag> ... </root_tag>"
tmp_xml := regexp_substr(tmp_file, '<\?xml[^?]+\?>\s+<([^>]+)>.*?</\1>', 1, nb_rec, 'n');
exit when length(tmp_xml) = 0;
--dbms_output.put_line(tmp_rec);
nb_rec := nb_rec + 1;
SELECT Account_ID, AccountName, AccountType, AccountOwner
into rec.Account_ID, rec.AccountName, rec.AccountType, rec.AccountOwner
from xmltable(
'Accounts/AccountMapping' passing xmltype(tmp_xml) columns
Account_ID varchar2(100) path 'Account_ID'
, AccountName varchar2(100) path 'AccountName'
, AccountType varchar2(30) path 'AccountType'
, AccountOwner varchar2(100) path 'AccountOwner'
pipe row ( rec );
end loop;
dbms_lob.freetemporary(tmp_file);
END getRows;
END XML_FILEHANDLER;
-- I am calling my function using the following sql query
select * from table(XML_FileHandler.getRows('XML', 'test.xml'));
Here is the error I am receiving
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 265
ORA-06512: at "user.XML_FILEHANDLER", line 13
29283. 00000 - "invalid file operation"
*Cause: An attempt was made to read from a file or directory that does
not exist, or file or directory access was denied by the
operating system.
*Action: Verify file and directory access privileges on the file system,
and if reading, verify that the file exists.
I have done the following
- Provided appropriate access to user (read, write) including directory access rights
- ensured that directory exists
- ensured that file exists
I have searched all over google and metalink but am unable to get this to run.. please help!>
SELECT Account_ID, AccountName, AccountType, AccountOwner
into rec.Account_ID, rec.AccountName, rec.AccountType, rec.AccountOwner
from xmltable(
'Accounts/AccountMapping' passing xmltype(tmp_xml) columns
Account_ID varchar2(100) path 'Account_ID'
, AccountName varchar2(100) path 'AccountName'
, AccountType varchar2(30) path 'AccountType'
, AccountOwner varchar2(100) path 'AccountOwner'
>
change to
SELECT Account_ID, AccountName, AccountType, AccountOwner
into rec.Account_ID, rec.AccountName, rec.AccountType, rec.AccountOwner
from xmltable(
'AccountMap/Accounts/AccountMapping' passing xmltype(tmp_xml) columns
Account_ID varchar2(100) path 'Account_ID'
, AccountName varchar2(100) path 'AccountName'
, AccountType varchar2(30) path 'AccountType'
, AccountOwner varchar2(100) path 'AccountOwner'
SQL> SELECT Account_ID, AccountName, AccountType, AccountOwner
2 --into rec.Account_ID, rec.AccountName, rec.AccountType, rec.AccountOwner
3 from xmltable(
4 'AccountMap/Accounts/AccountMapping' passing
5 xmltype('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
6 <AccountMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
7 <Accounts>
8 <AccountMapping>
9 <AccountID>0000000000000-000</AccountID>
10 <AccountName>XLS</AccountName>
11 <AccountType>Excel</AccountType>
12 <AccountOwner>System</AccountOwner>
13 </AccountMapping>
14 <AccountMapping>
15 <AccountID>0000000000000-001</AccountID>
16 <AccountName>XLSS</AccountName>
17 <AccountType>Excel2</AccountType>
18 <AccountOwner>System2</AccountOwner>
19 </AccountMapping>
20 </Accounts>
21 </AccountMap>')
22 columns
23 Account_ID varchar2(100) path 'Account_ID'
24 , AccountName varchar2(100) path 'AccountName'
25 , AccountType varchar2(30) path 'AccountType'
26 , AccountOwner varchar2(100) path 'AccountOwner'
27 );
ACCOUNT_ID ACCOUNTNAME ACCOUNTTYPE ACCOUNTOWNER
XLS Excel System
XLSS Excel2 System2
SQL> for AccountID use AccountID not Account_ID
Account_ID varchar2(100) path 'AccountID'Edited by: AlexAnd on Aug 9, 2012 12:35 AM -
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. -
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
runkelHi ,
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:
user623693Hi ,
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 -
RuleAuthor : error importing XML Schemas into Data Model
Hi,
I have problems during import XML Schema in my Data Model.
I'm following these steps:
1) Click Definitions tab;
2) Click XMLFact;
3) Click Create
4) I enter the path for the schema and the directory to store JAXB-generated classes. In this directory every user has all permission (777).
In the next step when I click on "Add Shemas" I have this error:
java.io.IOException: Not enough space at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:451) at java.lang.Runtime.exec(Runtime.java:591) at java.lang.Runtime.exec(Runtime.java:429) at java.lang.Runtime.exec(Runtime.java:326) at oracle.rules.sdk.datamodel.impl.DataModelUtil.compileJavaFile(DataModelUtil.java:479) at oracle.rules.sdk.datamodel.DataModelManager.addXMLSchemaPath(DataModelManager.java:984) at oracle.rules.sdk.mapper.RuleObjectHelper.addSchemapath(RuleObjectHelper.java:2759) at oracle.rules.ra.uix.mvc.SchemaSelectorEH.addSchema(SchemaSelectorEH.java:138) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at oracle.rules.ra.uix.mvc.BeanEH.genericHandleEvent(BeanEH.java:869) at oracle.rules.ra.uix.mvc.BeanEH.handleEvent(BeanEH.java:838) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source) at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source) at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
I cannot find the solution!
Can someone help me?
Thanks.Do you still have enough disk space available on your file system to store the different xml-facts the RuleAuthor will create for you?
-
Importing XML to DB (JDBC)?
Is it possible to import XML data into a database schema?
In know there are various utilities using XSQL but is possible to do using JDBC?
Any info would be appreciated.
Cheers!With XSU an XML document may be imported into a database.
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10794/adx08xsu.htm#i1006999 -
XML to Oracle interface has same insert count regardless of XML input file
Not sure how to get around this one... I have an interface that simply transfers the contents of an XML file to an Oracle table. I keep getting the same insert count and records regardless of the XML file i'm using.
I was using a properties file with this, but then just decided to use memory to process the file. So, in the physical architecture of the XML topology object, I just specify the file name, xsd and schema.
Any thoughts on what's happening/what to check?Hi,
I'm having a similar problem.
I've settted up an XML topology using the following jdbc driver and jdbc url:
com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
jdbc:snps:xml?f=#XML_Import_Test.CurrFileName&ro=true&dod=true&lf=c:/odilog.log&ll=255
Then in the designer I've created a Package with the following steps:
1) Declare Step for the CurrFileName variable
2) A Set Variable Step for the variable TempFileName. Here I place the value of the file that I would like to process
3) A refresh Step for the CurrFileName variable with the following refresh code: select '#TempFileName' from dual
4) an Interace that maps the xml file that I would like to import to an Oracle Db Table
Now, when I run the package from the designer I've to hit two times the execute button to have the data in the db. The first time that I execute the interface the process is using the previous processed file.
Any ideas on what could be the problem? what I'm doing wrong?
Thanks a lot for all the help
Ben -
Import Xml file of BO R1 to BO R2
<p>Hi All,</p><p>I am facing problem while importing Business views in BO R2 created in Bo R1.</p><p>I have exported views from BO R1 using business view manager export option and this will create one xml file.Now i have to import it in BO R2 while doing this i am getting error </p><p>Error<br />----
<br />Object has integrity problems: <br /> "The object references an invalid Business Field. Either the Business Field is null, or is not defined in the Business Element."</p><p> Is it the correct way to do this.</p><p>how i can use my views from BO R1 in BO R2.?</p><p>Thanks.</p>You might want to start the online tutorials. (http://www.oracle.com/technology/obe/start/index.html) Drill into the Database 10g tutorials and go to the Extended Data management ones at the end.
You also might want to start at the XML-DB portal to see whether they have any demos or samples. All product portals start at OTN (http://otn.oracle.com), go into the product family (Product [left edge] > Database), then into the feature set (Content Management sounds like a good guess) and finally to the component (XMLDB) and see whether there are any discussions, white papers (venter area) or samples and tutorials (right edge)
Or you might want to look at the XML technology portal to see whether they have any demos or samples. All technology portals start on OTN at http://otn.oracle.com, go to the Technology Centers (Technology [left edge]), select Technology header if the area is not immediately visible, go to the XML Tech Center, see if there are some discus edge)sion papers or Sample Code (right edge)
Barring that, you could your Google to search for "load xml into oracle" and perhaps select the first link that pops up (Loading A Large Xml Document Into The Database)
Or you could go to a book store such as Amazon, search for "Oracle XML" and buy a book like
- "Oracle Database 10g XML & SQL: Design, Build, & Manage XML Applications in Java, C, C++, & PL/SQL (Osborne ORACLE Press Series) by Mark Scardina, Ben Chang, and Jinyu Wang (Paperback - May 31, 2004)"
or my favorite
- "Building Oracle XML Applications by Steve Muench (Paperback - Oct 2, 2000) - Illustrated"
[No spoon feeding ...] -
How to Import XML file into SAP B1
Dear All,
I have a scenario like,
I am receiving a XML file from a 3rd party application for the daily Creation,Update of Item Master,BP Master, Marketing Documents. I want to import this file into SAP B1 through its approp objects. I understand DTW has limitation in its file types (Semicolo,Tab,Comma,ODBC). How do i do this ? Please guide me.
Thanks,
Thanga Raj KHy folks,
I´m frim Brasil and I've been studying the tool EFM (Eletronic File Manager) to learn more about it!
There I saw that we can extract to XML "any" infomation from the database we want, mainly through the GEP.
However, as I've seen, this Add-On can not import any XML file into SBO, unless for the BFP wich can be imported in conjunction with the BTHF Add-on.
So I ask: how is it possible to import XML data into SBO database? Is it possible to be done through the EFM? or it´s really necessary to write a code specifically to do that?
Besides, I know that de B1iSN fit to this necessity... but when I tried to use it, by the custom "object" for BP, for example, there are some data wich the mapping conteined in this custom "process" that can not be imported... I tried to understand how to map those other fields not imported by the custom but this has been dificult to me as I am a implementation consultant focused in administrative process not on development...
Could you please help me with this subject!
Thanks a lot,
Denis -
Import error on Oracle Database Express 10.2.0.1.0
Hi,
I try to import data from oracle V10.01.02 running on SUSE10 Linux to
oracle 10g (10.1.0.2.0) running on Windows Server 2003.
I am able to import the big part from my ata, but not all data.
The begin of my log file is:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0
- Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.01.00 via conventional path
And after some time I receive:
IMP-00019: row rejected due to ORACLE error 12899
IMP-00003: ORACLE error 12899 encountered
ORA-12899: value too large for column "SAFCI"."EMP"."NAME"
(actual: 65, maximum: 64)
Column 1 1000005025
Column 2 ??????? ???????
Column 3 19-SEP-2002:00:00:00
Column 4 9089
Column 5 ??. ?????
Column 6 1.9828
Column 7 377.77
Column 8 75.55
Column 9 ???????????? ???????? ? ??? ???? ? 32 ??.
Column 10 19-SEP-2002:00:00:00
Column 11 ?????? ?????, ?.?. 172747675, ???. 23.11.200?
Column 12 ????????? ?????????
Column 13 ? ????
Column 14 T
Column 15
Column 16 F
IMP-00019: row rejected due to ORACLE error 12899
IMP-00003: ORACLE error 12899 encountered
ORA-12899: value too large for column "SAFCI"."EMP"."NAME"
(actual: 65, maximum: 64)
Column 1 1000006408
Column 2 ??????? ???????
Column 3 05-NOV-2002:00:00:00
Column 4 9089
Column 5 ??. ?????
Column 6 1.939
Column 7 82
Column 8 16.4
Column 9 ?????????? ? ???? ???? ? 40 ??.
Column 10 05-NOV-2002:00:00:00
Column 11 ?????? ?????, ?.?. 172747675, ???. 23.11.200?
Column 12 ????????? ?????????
Column 13 ? ????
Column 14 T
Column 15
Column 16 F 36943 rows imported
I can not understand this problem, because I exported the hole user and
also try to import the hole user in my new system.
Pls., can some one point me to some paper about this problem or help me
to solve the problem.
Thanks
configuration Oracle10g (EXP source)
SQLWKS> select * from nls_database_parameters
2>
PARAMETER VALUE
NLS_LANGUAGE BRAZILIAN PORTUGUESE
NLS_TERRITORY BRAZIL
NLS_CURRENCY R$
NLS_ISO_CURRENCY BRAZIL
NLS_NUMERIC_CHARACTERS ,.
NLS_CHARACTERSET WE8ISO8859P1
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/RR
NLS_DATE_LANGUAGE BRAZILIAN PORTUGUESE
NLS_SORT WEST_EUROPEAN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY Cr$
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.1.0.2.0
configuration Oracle10g Express (IMP destination)
SQL> select * from nls_database_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET AL32UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.1.0Hi
Your import database use a multibyte characterset, your export db a singlebyte cs.
This means, a char can need more than 1 byte.
Try this before import (and before create tables!!):
alter system set nls_length_semantics=char;Greetings
Sven -
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,
MikeHi
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 -
I need to know how to import xml files into indesign cs6.
My client wants to send me xml text files to import into Indesign for a multi-page publication. I don't have a clue where to start. Can you point me to a tutorial that would help me figure this out?
I have a sample file that looks like this:
<?xml version="1.0"?>
<providers>
<provider>
<name>Bow Valley College</name>
<description>Putting the Community back in college…in the Bow Corrid
ANY TIME, ANY PLACE, ANY PATH, ANY PACE LEARNING.
Designated as the comprehensive community college for Calgary & its
surrounding region, Bow Valley College offers you learning opportunities
through flexible delivery options, including classrooms, online or self
paced modules. Whether you are taking a course for interest, to enhance
your career skills or to finish high school you have access to all of the
traditional Bow Valley College student supports.
Visit our website [2] or come see us at our Canmore campus.
BOW VALLEY LEARNING COUNCIL MEMBER.
Links:
[1] http://www.bowvalleycollege.ca/bow-corridor.html
</description>
<contact_information>Canmore Campus
Provincial Building, 800 Railway Ave.
Canmore, AB  T1W 1P1
OFFICE HOURS: 8:30am - 4:30pm, Monday - Friday (except from 12 - 1pm)
PHONE: (403) 678-3125
FAX: (403) 678-3127
BANFF CAMPUS: Lower Level, Banff YWCA, 102 Spray Ave., Banff (ONLY OPEN
WHEN COURSES OFFERED). </contact_information>
<email>[email protected]</email>
<website>www.bowvalleycollege.ca/bow-corridor</website>
<registration_information>Cancellation policy: Once your course has begun no refunds or credits will
be given. Compassionate grounds may be considered with official
documentation. There are no refunds, transfers, or credits if you cancel
within one week of the course start date.
BY PHONE: (403) 678-3125. Payment by Visa or Mastercard
IN PERSON: Canmore Campus, Provincial Building, 800 Railway Ave., Canmore.
Payment by cash, Visa or Mastercard.
 
FUNDING ASSISTANCE MAY BE AVAILABLE FOR THOSE ON A LOW INCOME ON SOME
COURSES. PLEASE ASK FOR MORE INFORMATION.</registration_information>
<courses>
<course>
<title>Computer Basics/Windows 7 - Instructor led, Canmore</title>
<description>An instructor will lead the class through the basic features of Microsoft
Windows, the Internet and Email. Find out how to start programs, create,
save and organize your files and use the online help feature. You’ll also
get an introduction to surfing the internet and setting up an email
account. This course is designed for those with little or no computer
experience – and is still our most popular course. 18 HR COURSE.</description>
<schedule_entries>
<entry>
<date>Mon 6:30 - 9 pm, Oct 7 - Dec 2</date>
<date>Thu 6:30 - 9 pm, Oct 10 - Dec 5</date>
</entry>
</schedule_entries>
</course>
<course>
<title>Word 2010 Introduction - Self-paced</title>
<description>Explore the basics of Microsoft Word to produce professional letters and
documents. This course guides you through the effective use of the Word
Ribbon and Quick Access Toolbar. You’ll learn how to efficiently edit,
move and copy text; manipulate fonts; apply bullets and numbering; borders
and shading; insert and re-size Clip Art; enter headers and footers; insert
page numbers; set alignment and indents; and change page settings. You’ll
learn to use the AutoCorrect feature and finish documents using the
spelling, thesaurus and grammar features.
Self-paced, 18 hr course.
Prerequisite recommended: Computer Basics or equivalent experience.</description>
<schedule_entries>
<entry>
<date>Mon 7:30 - 9 pm, Oct 7</date>
<date>Thu 7:30 - 9 pm, Dec 5</date>
</entry>
</schedule_entries>
</course>
<course>
AND SO ON...FOR 64 PAGES WORTH OF CONTENT
HELP!!!
SGARENHello Sally,
First, I have only heard/read good things about the book Steve recommends. It is on my to buy list one day. Been awaiting a long deserved vaction to pick it up to read.
I approach XML files pretty much like I do any text file I am sent in that I will import or copy/paste a text file into a frame in ID and begin setting my styles. With XML, though, I first clean it up, move closing tags up to their logical close lines, remove spurious codes that mean something in HTML but don't necessarily belong in the XML file (like ’ which is an apostrophe so I do a search and replace. But for   which is a non-breaking space I simply search and replace with a regular space in general), and make sure the XML validates.
Validation is much like making sure an HTML page is formed properly. I use an XML editor (XML BluePrint) and a text editor (UltraEdit) for these tasks. If I had to only have one or the other, I suppose the XML editor is what I would use.
I always show the import options when I import the XML and make sure that I link to the file.
So once a sample of the XML is on a page in ID (via File | Import XML), I highlight text within a tag, say like in your example above, the Providor name, and make it like I want and then create a new style. I generally name the styles as per the XML tag. Later on, that makes mapping tags to styles a little easier.
Once I set up all the styles preliminarily, I map the tags to styles. You can do that either via the Tags palette or via the Structure Pane that will appear once the XML is imported. In both cases, it is found via the flyout menu at the top right of their respective windows.
After mapping my styles to the tags, I select the root element in the Structure Pane (the topmost element. In your sample above it is "providors" and delete it. This removes the XML in your ID file. But the styles and tags are still present.
Then I import the XML again and look to makes sure all the tags/elements are styled as intended. I then correct any errors/ommissions. Then...I'll delete the XML again and import the full XML file.
I can upload what I did with your XML sample above so you can compare it to your source file if you would like. You would then see how/where I moved tags. Now, moving the tags is only "necessary" to avoid all the extra blank paragraphs. That can be accomplished by ID's search/replace, too. But I like to start out with the XML cleaned up, so I take the few minutes to do it.
Take care, Mike -
Can't Figure Out How To Import XML into a Table?
HELP!
I've been using InDesign for several years now... but everything Ive ever done has been basic one off layout concepts.
I am working on a website for a musical theater actress and for her resume, Id like to make a PDF which lists in table format the show, theatre and role she had for each job.
I could do this manually... but Id really like to learn how to just reuse the same XML data that I have for her website and import it into InDesign.
I have looked at Adobe's help file, I have scoured the internet, and I still can't figure it out... I have done like the adobe support file says... and I cant seem to get the values I create in her resume xml file to show up in a table I create in InDesign.
I even tried to simplify it for the learning process and did something as basic as an XML file that has 5 colors... couldnt even get that working.
So could someone explain it to me like Im a 5 year old... how to take a XML file, import it, place it in a table and have the data actually show up in the table.
thanks,
brianAre you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
Jeremy -
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
kedarBen,
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
Maybe you are looking for
-
How to get Material details based on 0material in 0figl_o02 DSO
Hi In Financial Accounting we have DSO for General Ledger: Line items (0FIGL_o02) It contains Material no. for each transaction record but other material details like Qty used and price for that material and other related details are not present and
-
Change costing method from Moving Average to Standard costing
Hi Expert I need to find out the prerequisites for changing the valuation method of an item from Moving average to Standard costing. (In the forums i found a note which discusses the change of costing method from FIFO to Moving average.) It would be
-
My headphone jack isn't recognizing my headphones
I just bought a 7th gen Ipod nano. My headphones work fine, but my Ipod isn't recognizing them at all. I tried resetting the settings, but that didn't work. I tried another set of headphones and that didn't work either.
-
Switching between 72 and 96 PPI?
Do you need to create a new FW page with 72 or 96 PPI based on whether you are working with a Mac or PC, or does it not matter? If it does matter, what happens if you are working between a Mac and a PC? Will your design and layout be affected if you
-
Lived in germany for 1 year and changed dvd player setting 6 times between 1 and 2
Hi i lived in germany for one year and had american dvds with me and chnaged between german and english more than 6 times now i am in america and only can watch german videos. Does somebody now how to change a 7th time?