Insert XML data base records
HelloI have a requirement to write a stored procedure that will be an XML file as an input argument and the search for the tags < salary / >, < Manager / > in the XML file and insert those values in a table.
The pointers will be appreciated.
Concerning
Two options are to analyze this in PL/SQL and pass these results in INSERT statements or spending it all in an INSERT
Tags: Database
Similar Questions
-
Insert XML data from the Table->; back to null
Dear Experts,
-I have table xml as below:
Example of CREATE TABLE (XML_spec XMLTYPE);
Insert in the example
Select ' < name of Message = "dataStaticInvestor" type = "IncomingMessage" >
< name of field = "batchReference" > OPENINGBATCH000000 < / field > < List name = "data" >
< = record name "data" >
< name of field = "externalReference" > 01234567890aaaaaaa < / field >
< name of field = "participantID" > OD001 < / field >
< name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
< / recording >
< = record name "data" >
< name of field = "externalReference" > 01234567890aaaaaaa < / field >
< name of field = "participantID" > OD001 < / field >
< name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
< / recording >
< = record name "data" >
< name of field = "externalReference" > 01234567890aaaaaaa < / field >
< name of field = "participantID" > OD001 < / field >
< name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
< / recording >
< / list >
< / message > ' double.
Select * example;
create table hasil1 (c1 varchar2 (500), c2 varchar2 (500), c3 varchar2 (500));
-This step I create the procedure to insert xml data into the table as the batch.
DECLARE
x XmlType;
BEGIN
Select XML_SPEC in x for example;
insert into hasil1
SELECT
p.Extract('/Record/Field/@externalReference').getstringval (C1),
p.Extract('/Record/Field/@participantID').getstringval (C2),
p.Extract('/Record/Field/@participantName').getstringval () as c3
TABLE (XMLSequence (Extract(x,'Message/List/Record'))) p;
commit;
END;
/
-when the result of select hasil1, the output is back 3 rows and 3 columns, but all data is a null *.
Best regards
SigcleYou don't explain what output you need, but I guess something like this:
SQL> insert into hasil1 (c1, c2, c3) 2 select x.c1, x.c2, x.c3 3 from example t 4 , xmltable( 5 'Message/List/Record' 6 passing t.xml_spec 7 columns c1 varchar2(500) path 'Field[@name="externalReference"]' 8 , c2 varchar2(500) path 'Field[@name="participantID"]' 9 , c3 varchar2(500) path 'Field[@name="participantName"]' 10 ) x 11 ; 3 rows inserted SQL> select * from hasil1; C1 C2 C3 ---------------------- --------- -------------------------------- 01234567890aaaaaaa OD001 EQUITY SECURITIES INDONESIA,PT 01234567890aaaaaaa OD001 EQUITY SECURITIES INDONESIA,PT 01234567890aaaaaaa OD001 EQUITY SECURITIES INDONESIA,PT
-
I'm trying to insert xml data into the table with the oracle sql developer - sql + it works correctly, but it is very difficult to work with her. How ro resolve this problem?
Create table credit of XMLType;
I received the error report:INSERT INTO credit VALUES (xmltype( ' <?xml version="1.0"?> <creditid>a7565</creditid>' ));
SQL error: ORA-31011: failed to parse XML
ORA-19202: an error has occurred in the processing of XML
LPX-00209: PI names beginning with XML are reserved
Error on line 1
ORA-06512: at "SYS." XMLTYPE", line 310
ORA-06512: at line 1
31011 00000 - "XML parsing failed"
* Cause: XML parser returned an error trying to parse the document.
* Action: Check whether the document to parse is valid.
Thank you.
Published by: user11974179 on 2012.5.1 14:15And in case you do not have access to MOS, just remove the space to the left of the XML string:
INSERT INTO credit VALUES( xmltype('
a7565 ') ); -
Error when inserting XML Date in the Table
Hi all
I am working on Oracle 11 g and trying to insert a date XML in the table but get error - below
Query - insert into TableName (ID, CREATION, CREATEDBY) VALUES (50, *'2010 - 12-15 T 12: 57:19'*, 'Name')
Error - java.sql.SQLDataException: ORA-01861: literal does not match the format string
CREATED column datatype is Date
When I try to use sysdate instead of hard-coding XML date of obtaining inserted successfully into the table. Please let me know how to pass this XML format date.
Thanks in advance.
Concerning
NikhilI don't see any XML in what you posted. In any case:
"2010 12-15 T 12: 57:19'.
is a string, not a date. Use:
to_date('2010-12-15T12:57:19','YYYY-mm-dd"T"HH24:mi:SS')
For example:
SQL> create table tbl(created date); Table created. SQL> insert into tbl values('2010-12-15T12:57:19'); insert into tbl values('2010-12-15T12:57:19') * ERROR at line 1: ORA-01861: literal does not match format string SQL> insert into tbl values(to_date('2010-12-15T12:57:19','YYYY-MM-DD"T"HH24:MI:SS')) 2 / 1 row created. SQL>
SY.
-
Insert XML data into the MySQL database
Hi all, I'm new with XML and I need help with the insertion of XML data in the mysql database using coldfusion. I looked on the Coldfusion Documentation and saw how to convert XML to a Coldfusion query... but there was no example of how to do an insert. If anyone can give me a good example or point me towards a good direction on how to do it, I would really appreciate it.
Thank you very much in advance
AlfieNevermind, I finally managed to do work!
-
Tabular - submit custom and insert/updated data in records
I have a tabular layout with 2 columns representing the data in the table and custom 5 columns.
The task ID Name of the task 07/10/2013-10 13, 2013 14/10/2013 to 20/10/2013 21/10/2013-10 27, 2013 28/10/2013-03/11/2013 11 04, 2013 at 10/11/2013 1 TASK1 2 TASK2 3 TASK3 I use a sql that returns null for columns 3 to 7 values. Can I use the html form of the apex option and jquery to add change the headers for weeks and add checkboxes.
My sql: select task_id, TaskName, null, null, semaine2, null, null semaine4 semaine3 week1, week5 < table name > null
My table has columns task id, task name, start_date and end_date.
When the user clicks on the button submit, I need to send the box to my stored procedure and insert records into the table. I can't find out how to send a mapping of the task_id, date in each column headers and data box at the apex back end and treat them. For example, if the first check box in the first row is checked, I have to insert a row with the values "1, TASK1, 07/10/2013, 13/10/2013. I have also read data from the table and display it in the same format. Please let me know how to proceed in the apex.
instead of using the null value, you can use apex_item api to create checkboxes
read http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CHDDCHAF
You can set the value of checkboxes using apex_item api, then the value may be captured in your process of
Check this: Martin Giffy D'Souza on Oracle APEX: APEX (Advanced) with checkboxes report.
Let me know if that answers your query in the active thread
Kind regards
Vishal
-
Hello
I have a procedure that takes xmltype as input parameter that contains data such as:
<? XML version = "1.0"? >
rowset <>
< ROW >
< > 7782 EMPNO < / EMPNO >
CLARK < ENAME > < / ENAME >
MANAGER < JOB > < / JOB >
< MGR > 7839 < / MGR >
< HIREDATE > 9 June 81 < / HIREDATE >
< SAL > 2450 < / SAL >
< DEPTNO > 10 < / DEPTNO >
< / ROW >
< ROW >
< > 7839 EMPNO < / EMPNO >
KING of < ENAME > < / ENAME >
PRESIDENT < JOB > < / JOB >
< HIREDATE > 17 November 81 < / HIREDATE >
< SAL > 5000 < / SAL >
< DEPTNO > 10 < / DEPTNO >
< / ROW >
< ROW >
< > 7934 EMPNO < / EMPNO >
MILLER < ENAME > < / ENAME >
CLERK of < JOB > < / JOB >
< MGR > 7782 < / MGR >
< HIREDATE > 23 January 82 < / HIREDATE >
< SAL > 1300 < / SAL >
< DEPTNO > 10 < / DEPTNO >
< / ROW >
< / LINES >
I analyze this data and insert into the employee table.
I remember that using the extract function we can do, but I do not get it exactly.
Can you please help me in this.
Thank you
VinodSee [url http://docs.oracle.com/cd/E14072_01/server.112/e10592/functions251.htm#CIHGGHFB] XMLTABLE
For example:
-- INSERT INTO
WITH x AS (SELECT XMLTYPE(' 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 7839 KING PRESIDENT 17-NOV-81 5000 10 7934 MILLER CLERK 7782 23-JAN-82 1300 10 -
Impossible to insert xml data into the table
HII All,
I'm unable to parse the following xml file and insert them into the table.
Version of DB
======
My DB TableSQL> SELECT * 2 FROM V$VERSION; Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for Solaris: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production
Published by: RUSSO April 7, 2011 04:19Create table rgh_xml_storage ( user_id varchar2(4000), to_type varchar2(4000), mail_id varchar2(4000), subject varchar2(4000), sentDateTime varchar2(4000) )
Hello
Please provide all pertinent details!
Please correct my insert if statement it must be.
You have a few bad XPath.
Here's a way to unnest correctly repeated elements:SQL> select x1.user_id, 2 x1.subject, 3 x1.sentDateTime, 4 x2.to_type, 5 x2.mail_id 6 --x1.messageBody 7 from xmltable( 8 '/emailMessage' 9 passing xmltype(bfilename('TEST_DIR','email.xml'), nls_charset_id('CHAR_CS')) 10 columns user_id varchar2(4000) path 'headerInformation/sender/user/@userID', 11 subject varchar2(4000) path 'headerInformation/subject', 12 sentDateTime varchar2(4000) path 'headerInformation/sentDateTime', 13 messageBody clob path 'messageBody', 14 my_xml xmltype path 'headerInformation/recipients' 15 ) x1, 16 xmltable( 17 '/recipients/recipient' 18 passing x1.my_xml 19 columns to_type varchar2(4000) path '@type', 20 mail_id varchar2(4000) path 'user/@emailAddress' 21 ) x2 22 ; USER_ID SUBJECT SENTDATETIME TO_TYPE MAIL_ID -------------------- ------------------------------------------------ ------------------------------ --------- ------------------------------------------ RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 to [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 cc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] RC58522 Re: CAA - Schlesinger ' Arnold - LP01115771 Fri Oct 10 13:31:53 EDT 2010 bcc [email protected] 13 rows selected
-
Inserting XML data in xmltype column
Oracle version: 10.1.0.5
OpenVms Alpha V8.3
(1) tried this and getting the error below. Place a zero and remove charset. Same mistake.
INSERT INTO xml_demo (donnees_xml) - xmltype column
VALUES
(
XmlType
(
BFILENAME ('XML_DIR ',' MOL.) XML').
nls_charset_id ('AL32UTF8')
),
);
ORA-22993: much of the specified input is greater than the quantity real source
ORA-06512: at "SYS." DBMS_LOB", line 637
ORA-06512: at "SYS." XMLTYPE", line 283
ORA-06512: at line 1
(2) this PL/SQL block works. However maximum brute size about 32K. The file may be around 100 K. May be I can load into a table of raw and somehow concatnate to insert. Not sure if it's possible, but I'm sure there must me a simple way to do this.
Subset of the xml file is pasted below.
Set serveroutput size 1000000
DECLARE
bfile file1;
XMLType v_xml;
len1 number (6);
v_rec1 raw (32000);
BEGIN
File1: = bfilename ('XML_DIR ',' MOL.) XML');
DBMS_LOB. FileOpen (File1, DBMS_LOB.file_readonly);
len1: = DBMS_LOB.getLength (file1);
v_rec1: = dbms_lob.substr(file1,len1,1);
v_xml: = xmltype (UTL_RAW. CAST_TO_VARCHAR2 (v_rec1));
INSERT INTO xml_demo (donnees_xml) VALUES (v_xml);
COMMIT;
DBMS_LOB. FileClose (file1);
exception
while others then
dbms_output.put_LINE (sqlerrm);
DBMS_LOB. FileClose (file1);
END;
/
<? XML version = "1.0" encoding = "UTF-8"? >
< MolDocument DtdVersion = "3" DtdRelease = "0" >
< DocumentIdentification v = "MOL_20100331_1500_1600" / >
< DocumentVersion v = "1" / >
< V DocumentType = "A43" / >
< CodingScheme = v "A01" SenderIdentification = "17X100Z100Z0001H" / >
< SenderRole v = "35" / >
< ReceiverIdentification codingScheme = v "A01" = "10XFR-TEN - Q" / >
< ReceiverRole v = "A04" / >
< CreationDateTime v = "2010-03 - 31 T 14: 10:00Z" / >
< ValidTimeInterval v = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
< codingScheme domain = "A01" v = "10YDOM-1001A001A" / >
< MolTimeSeries >
< ContractIdentification v = "RTE_20100331_1500_16" / >
< ResourceProvider codingScheme = v "A01" = "10XFR-TEN - Q" / >
< CodingScheme = v "A01" AcquiringArea = "17Y100Z100Z00013" / >
< ConnectingArea codingScheme = v "A01" = "10YFR-TEN - C" / >
< AuctionIdentification v = "AUCTION_20100331_1500_1600" / >
< BusinessType v = "10" / >
< BidTimeInterval v = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
< MeasureUnitQuantity v = "MAW" / >
< v currency = "EUR" / >
< MeasureUnitPrice v = "MWH" / >
< v direction = "A02" / >
< MinimumActivationQuantity v = "50" / >
< v status = "A06" / >
< period >
< v TimeInterval = "2010-03 - 31 T 15: 00Z / 2010-03 - 31 T 16: 00Z" / >
< resolution v = "PT60M" / >
<>interval
< v pos = "1" / >
< v Qty = "50" / >
< character v = "50.45" / >
< / interval >
< / period >
< / MolTimeSeries >
< / MolDocument >Hello
A couple of workarounds, try:
DECLARE v_lob CLOB; v_file BFILE; BEGIN v_file := BFILENAME('XML_DIR','mol.xml'); DBMS_LOB.createtemporary(v_lob, true); DBMS_LOB.fileopen(v_file); DBMS_LOB.loadfromfile(v_lob, v_file, DBMS_LOB.getlength(v_file)); INSERT INTO xml_demo VALUES( xmltype(v_lob) ); DBMS_LOB.fileclose(v_file); DBMS_LOB.freetemporary(v_lob); END; /
or,
DECLARE v_lob CLOB; BEGIN v_lob := DBMS_XSLPROCESSOR.read2clob('XML_DIR', 'mol.xml', nls_charset_id('AL32UTF8')); INSERT INTO xml_demo VALUES( xmltype(v_lob) ); END; /
-
I have this code:
< cfoutput query = "mod" >
#mod.ID #.
#mod.name #.
#mod.surname # < br / >
< img src = "" #mod.image # "/ > < br / >"
< / cfoutput >
for this, employment, all data in the query are displayed but one point under the other, I wish them to be displayed on the same vintage 3 before having another thought with other 3 records in the query.
How do I do that?
Dario
#data #.
-
Error occurred when the XML data is inserted in the table.
Hello
I'm trying to load the xml data into the table of following code.but get below error
Error on line 1
ORA-31011: XML parsing failed
ORA-19202: an error has occurred in the processing of XML
LPX-00222: error received from the SAX callback function
ORA-06512: at "SYS." DBMS_XMLSTORE', line 78
ORA-06512: at line 21
DECLARE xmldoc clob; insCtx DBMS_XMLStore.ctxType; dname varchar2(20) := 'MDIR'; rows number; BEGIN xmldoc := dbms_xslprocessor.read2clob(dname, 'try_xm3.xml'); insCtx := DBMS_XMLStore.newContext('try1'); dbms_output.put_line('1'); DBMS_XMLStore.setRowTag(insCtx, 'cajas'); rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc); commit; dbms_output.put_line('INSERT DONE '||TO_CHAR(rows)); DBMS_XMLStore.closeContext(insCtx); END;
can you please look at this?<?xml version="1.0" encoding="utf-8"?> <cajas xmlns="PBcion.Caja" fec="2011-03-02T14:20:14" codDeleg="093"> <caj codPrev="80001223" fechaInicio="2011-03-02" fec="2011-09-02" couta="01" idPerio="1" caj="32"></caj> </cajas>
I m using oracle 10ginsert into try1 with t as ( select xmltype('
') x from dual ) select codPrev, fechaInicio, fec, couta, idPerio, caj from t, xmltable( '/' passing x columns codPrev number path '@codPrev', fechaInicio varchar2(25) path '@fechaInicio', fec varchar2(25) path '@fec', couta number path '@couta', idPerio number path '@idPerio', caj number path '@caj' ) / 1 row created. SQL> select * 2 from try1 3 / CODPREV FECHAINICIO FEC COUTA IDPERIO CAJ ---------- ------------------------- ------------------------- ---------- ---------- ---------- 80001223 2011-03-02 2011-09-02 1 1 32 SQL> SY.
-
generation of XML for each record
I have a table db with a few thousand records in it. I need to generate an xml file for each record so that it can power a search machine.
Can someone help me with this? I could not get it. Here is the example of table.
create table test_xml)
number of U_ID
title varchar2 (500),
VARCHAR2 (500) keywords.
Description varchar2 (500),
VARCHAR2 (500) of the user.
e-mail varchar2 (500),
initiator_function varchar2 (500),
function_impacted varchar2 (500),
old_request_num varchar2 (500),
project_region varchar2 (500)
);
insert into test_xml values (1, "Heading1 test", "blah bla1", "test 123 ', 1234567',' [email protected]', 'test init funct', 'funct hit test', '55556677', 'abc' ');
insert into test_xml values (2, 'Title2 test', 'blah bla2', ' test 1232', 1234522',' [email protected]', 'test init funct2 ',' test power supply impacted2', ' 55556679', 'abcccs' ");
the end result is an XML for each record in this format.
<? XML version = "1.0" encoding = "utf-8"? >
<! DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA RSS / / IN" "" > "".
< gsafeed >
< header >
< datasource > ID 1 < / datasource >
< feedtype > full < / feedtype >
< / header >
<>Group
" < analysis record immediately = 'true' url = ' http://test.com/SearchResult.php?id=1 "action = 'Add' mimetype =" text/html"lock ="true"> "
< content > <! [CDATA]
< html >
< head >
Heading1 test < title > < /title >
< meta name = "Keywords" content = "bla bla1" / >
< name meta = "description" content = "testing 123" / >
< name meta = "user" content = "1234567" / >
" < name meta = 'EMAIL' content = ' [email protected] " />
< name meta = "Source" content = "1" / >
< / head >
< body >
< p > user: 1234567
< p > EMAIL: bob . [email protected]
< p > INITIATOR_FUNCTION: test init funct
< p > FUNCTION_IMPACTED: test hit funct
< p > OLD_REQUEST_NUM: 555566777
< p > PROJECT_REGION: abc
< /p > < / body >
< / html >
[]] > < / content / >
< / recording >
< / Group >
< / gsafeed >
Thanks for any help.
I'd use SQL/XML functions, more rapid way to generate XML from relational data data.
Something like the following should you get.
It displays a document (such as a CLOB) per line in the base table:
with html_content as ( select xmlcdata( xmlserialize(document xmlelement("html" , xmlelement("head" , xmlelement("title", t.title) , xmlelement("meta", xmlattributes('Keywords' as "name", t.keywords as "content")) , xmlelement("meta", xmlattributes('description' as "name", t.description as "content")) , xmlelement("meta", xmlattributes('user' as "name", t.user_ as "content")) , xmlelement("meta", xmlattributes('EMAIL' as "name", t.email as "content")) , xmlelement("meta", xmlattributes('Source' as "name", t.u_id as "content")) -- ?? ) , xmlelement("body" , xmlelement("p", 'EMAIL: '||t.email) , xmlelement("p", 'INITIATOR_FUNCTION: '||t.initiator_function) , xmlelement("p", 'FUNCTION_IMPACTED: '||t.function_impacted) , xmlelement("p", 'OLD_REQUEST_NUM: '||t.old_request_num) , xmlelement("p", 'PROJECT_REGION: '||t.project_region) ) ) indent ) ) as content from test_xml t ) select '' || '' || xmlserialize(document xmlelement("gsafeed" , xmlelement("header" , xmlelement("datasource", 'ID 1') , xmlelement("feedtype", 'full') ) , xmlelement("group" , xmlelement("record" , xmlattributes( 'true' as "crawl-immediately" , 'http://test.com/searchresult.php?ID=1' as "url" , 'add' as "action" , 'text/html' as "mimetype" , 'true' as "lock" ) , xmlelement("content", html.content) ) ) ) indent ) from html_content html ;
NB: indent option is to print only, you can remove it if you don't need.
-
Stuck with ORA-30937 when inserting XML in the table...
Hello
We are in 10 gr 2 (10.2.0.3.0)
I've never been so far with XMLs...
and I followed as well as Marc can messages and XML and relational views:
DB XML FAQ
I have saved the schema, renamed tables XMLTYPE that I needed...
but when I try to insert my XML data in the XMLTYPE, I get this error:
ORA-30937: no schema definition for 'WORKBENCH_PROJECT' (namespace ") in parent ' / '.
I think I need to display the xml, xsd, and code as well:
XML is:
<? XML version = "1.0"? >
< WORKBENCH_PROJECT >
< BaseCalendars >
< calendar
name = "Standard" lastUpdatedDate = "2001-07 - 10 T 09: 04:08" >
< / calendar >
< calendar
name = "Tunbase" lastUpdatedDate = "" 2008-02 - 21 T 12: 01:30 ' lastUpdatedBy = "sacchaud" > "
< days >
< day departure = '2008-01-01' isWorkDay = "false" / >
< day departure = finishing '2008-03-20' = '2008-03-21' isWorkDay = "false" / >
< day departure = "2008-04-09" isWorkDay = "false" / >
< day departure = '2008-05-01' isWorkDay = "false" / >
< day departure = '2008-07-25' isWorkDay = "false" / >
< day departure = '2008-08-13' isWorkDay = "false" / >
< day departure = "2008-11-07" isWorkDay = "false" / >
< / days >
< / calendar >
< calendar
name = 'SPAIN-BASE' lastUpdatedDate = "" 2008-11 - 28 T 10: 11:53 ' lastUpdatedBy = "ashwkulk" > "
< days >
< day departure = '2008-01-01' isWorkDay = "false" / >
< day departure = "2008-01-07" isWorkDay = "true" >
< go >
< Shift start = "08:00:00" complete ="12:00:00" / > "
< Shift start = "13:00:00" complete ="17:00:00" / > "
< / travel >
< / day >
< day departure = '2008-03-20' isWorkDay = "true" >
< go >
< Shift start = "08:00:00" complete ="12:00:00" / > "
< Shift start = "13:00:00" complete ="17:00:00" / > "
< / travel >
< / day >
< day departure = '2008-03-21' isWorkDay = "false" / >
< day departure = '2008-05-01' isWorkDay = "false" / >
< day departure = '2008-08-15' isWorkDay = "false" / >
< day departure = '2008-10-13' isWorkDay = "true" >
< go >
< Shift start = "08:00:00" complete ="12:00:00" / > "
< Shift start = "13:00:00" complete ="17:00:00" / > "
< / travel >
< / day >
< day departure = "2008-12-08" isWorkDay = "false" / >
< day departure = '2008-12-25' isWorkDay = "false" / >
< day departure = '2009-01-01' isWorkDay = "false" / >
< day departure = "2009-01-06" isWorkDay = "false" / >
< day departure = '2009-04-10' isWorkDay = "false" / >
< day departure = '2009-05-01' isWorkDay = "false" / >
< day departure = '2009-10-12' isWorkDay = "false" / >
< day departure = "2009-12-08" isWorkDay = "false" / >
< day departure = '2009-12-25' isWorkDay = "false" / >
< / days >
< / calendar >
< / BaseCalendars >
< PoolResources >
< PoolResource
resourceType = '0' inputTypeCode = '0' ADO = "FGASNIER" userFlag2 = "false" userFlag1 = "false".
fullName = "Gasnier Florian" firstName = "Florian" isExternal = "false" isActive = 'true '.
ResourceID = "FGASNIER" managerUserName = "PIDUPUIS" employmentType = "3" userNumber2 = "0.0".
userNumber1 = '0,0' userText2 = 'POWEO' userText1 = "' UDDI EUC + ' openForTimeEntry = 'true'"
emailAddress = '[email protected]' LastName As String = "Gasnier" isRole = "false" trackMode = "2" >
< Calendar CalendrierBase = 'FRANCE' >
< days >
< day departure = '2008-12-26' isWorkDay = "false" / >
< day departure = "2009-03-23" Finish = "2009-03-25" isWorkDay = "false" / >
< / days >
< / calendar >
< curve name = 'availability' type = '1' default = "1.0" / >
< / PoolResource >
< PoolResource
resourceType = '0' inputTypeCode = '0' ADO = "mmazelei" userFlag2 = "false" userFlag1 = "false".
fullName = "Kounde, Guillaume" firstName = "Guillaume" isExternal = "false" isActive = 'true '.
ID = "GKOUNDE" managerUserName = "PIDUPUIS" employmentType = "3" userNumber2 = "0.0".
userText3 = "RE7' userNumber1 = '0,0' userText2 = 'Poweo' userText1 =" ' UDDI EUC + ' openForTimeEntry = 'true' "
emailAddress = '[email protected]' LastName As String = "Kounde" isRole = "false" trackMode = "2" >
< Calendar CalendrierBase = 'FRANCE' >
< days >
< / days >
< / calendar >
< curve name = 'availability' type = '1' default = "1.0" / >
< / PoolResource >
< / PoolResources >
<>projects
< project
UID = "AJWF [& quot;" / A_ "'? & quot; GW:R'! '''? "P" ' 0 "baseTime =" "2008-10 - 02T 17: 33:10" closed = 'false' "
Active = 'true' approved = 'false' userText2 = 'Poweo' userText1 = '& amp; "D EUC +" start = "" 2008-10 - 02T 08: 00:00 ""
openForTimeEntry = 'true' format = '0' trackMode = '2' lastUpdatedDate = "" 2009-03 - 09 T 17: 25:03 ""
"baseFinish =" "2008-10 - 02T 17: 00:00" end = "2012-12 - 31 T 17: 00:00 ' baseStart =" "2008-10 - 02 T 08: 00:00" "
priority = "10" finishImposed = "true" cpmType = "0" name = 'ID-ID-Poweo recipe' startImposed = 'false '.
program = 'false' lastUpdatedBy = "lletaill" >
baseline <>
< baseline
Description = "P.Dupuis pilgrims © ation" code = 'Main' name = "ReferencePrincipale20081002" "
current = "true" / >
< / basic lines >
< resources >
< resource
requestStatus = '1' lastUpdatedBy = "JRATAJAK" resourceID = "lletaill" openForTimeEntry = "true".
lastUpdatedDate = "" 2009-01 - 06 T 16: 10:59 "bookingStatus ="15">"
< curve name = "allowance" type = "1" default = "1.0" / >
< curve name = 'rate' type = '1' default = "1.0" >
<>segments
"< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
< / segment >
"< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
< / segment >
"< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
< / segment >
"< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
< / segment >
< / segments >
< / curve >
< / resource >
< resource
requestStatus = '1' lastUpdatedBy = "EDAUDIFF" resourceID = "EDAUDIFF" availTo = "" 2009-02 - 14 T 00: 00:00 ""
openForTimeEntry = "false" lastUpdatedDate = "" 2009-02 - 16 T 15: 09:50 "bookingStatus ="15">"
< curve name = "allowance" type = "1" default = "1.0" / >
< curve name = 'rate' type = '1' default = "1.0" >
<>segments
"< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
< / segment >
"< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
< / segment >
"< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
< / segment >
"< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
< / segment >
< / segments >
< / curve >
< BaselineDetails >
< BaselineDetail
"Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
< curve name = "costCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
< / segments >
< / curve >
< curve name = "usageCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
< / segments >
< / curve >
< / BaselineDetail >
< / BaselineDetails >
< / resource >
< resource
requestStatus = '1' lastUpdatedBy = "JRATAJAK" resourceID = "JZARIOUH" availTo = "" 2010-12 - 31 T 17: 00:00 ""
"openForTimeEntry ="true"availFrom =" "2009-01 - 05 T 00: 00:00" lastUpdatedDate = "2009-01 - 05 T 15: 19:32.
bookingStatus = "15" >
< curve name = "allowance" type = "1" default = "1.0" / >
< curve name = 'rate' type = '1' default = "1.0" >
<>segments
"< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
< / segment >
"< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
< / segment >
"< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
< / segment >
"< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
< / segment >
< / segments >
< / curve >
< / resource >
< / resource >
< task
UID = "AJ; & apos; Y6'? 1_'' ' ? & quot; GW:R'! '''? ' "P" ' 0 "baseTime =" "2008-10 - 02T 17: 33:10" start = "2009-02 - 16 T 08: 00:00.
proxy = 'false' critical = "false" status = '0' lastUpdatedDate = "" 2009-03 - 09 T 17: 25:03 "outlineLevel = '3'"
"baseFinish =" "2008-10 - 02T 17: 00:00" end = "2009-02 - 16 T 17: 00:00 ' summary = 'false' baseStart =" "2008-10 - 02 T 08: 00:00" "
baselineDuration = "1.0" milestone = "false" name = "RE7 - awareness" fixed = "false".
Locked = 'false' key = 'false' lastUpdatedBy = "lletaill" percComp = "0,0" unexpected = "false" >
<>assignments
< assignment
status = '0' lastUpdatedBy = "lletaill" actualWork = "0,0" ResourceID = "EDAUDIFF" start = "" 2009-02 - 16 T 08: 00:00 ""
baselineWork = "144000.0" unplanned = "false" estPattern = "3" actualThrough = "" 2009-02 - 16 T 00: 00:00 ""
«Finish = "" 2009-02 - 16 T 17: 00:00 "="144000.0"remainingWork lastUpdatedDate =" 2009-03 - 09 T 17: 25:03»
estMax = "1.0" >
< curve name = "basic" type '2' default = '0.0' = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" >
< calendar >
< days >
< day dayOfWeek = 'SUN' isWorkDay = "false" / >
< day dayOfWeek = 'MY' isWorkDay = "true" >
< go >
< Shift start = "08:00:00" complete ="12:00:00" / > "
< Shift start = "13:00:00" complete ="17:00:00" / > "
< / travel >
< / day >
< day dayOfWeek = 'SAT' isWorkDay = "false" / >
< / days >
< / calendar >
< / segment >
< / segments >
< / curve >
< BaselineDetails >
< BaselineDetail
"Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
< curve name = "costCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
< / segments >
< / curve >
< curve name = "usageCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
< / segments >
< / curve >
< / BaselineDetail >
< / BaselineDetails >
< / assignment >
< / assignments >
< BaselineDetails >
< BaselineDetail
"Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
< curve name = "costCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
< / segments >
< / curve >
< curve name = "usageCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
< / segments >
< / curve >
< / BaselineDetail >
< / BaselineDetails >
< / task >
< / tasks >
< BaselineDetails >
< BaselineDetail
"Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
costSum = "2566.4" usageSum = "288000.0" duration = "1.0" >
< curve name = "costCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.08911111111111111" / >
< / segments >
< / curve >
< curve name = "usageCurve" type = "2" default "0,0" = >
<>segments
"< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "10.0" / >
< / segments >
< / curve >
< / BaselineDetail >
< / BaselineDetails >
< / project >
< / project >
< / WORKBENCH_PROJECT >
-------------------------------
XSD is (it was automatically generated by the "Stylus Studio" tools... so I changed a few stuffs up):
<? XML version = "1.0" encoding = "UTF-8"? >
< xsd: Schema targetNamespace = "http://www.oracle.com/xsd/projet.xsd."
container = "http://www.w3.org/2001/XMLSchema" elementFormDefault = "unqualified".
xmlns:xdb = "http://xmlns.oracle.com/xdb".
xdb:storeVarrayAsTable = 'true '.
xmlns = "http://www.oracle.com/xsd/projet.xsd" >
< xsd: element name = "WORKBENCH_PROJECT" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT ref = "BaseCalendars" / >
< xsd: ELEMENT ref = "PoolResources" / >
< xsd: ELEMENT ref = "Projects" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "BaseCalendars" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Calendar" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "PoolResources" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "PoolResource" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "PoolResource" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT ref = "Calendar" / >
< xsd: ELEMENT ref = "Curve" / >
< / xsd: SEQUENCE >
< xsd: attribute name = "category" / >
< xsd: attribute name = "emailAddress" / >
< xsd: attribute name = "employmentType" use = "required" type = "xsd: Integer" / >
< xsd: attribute name = "FirstName" type = "xsd:NCName" / >
< xsd: attribute name = "full name" use = "required" / >
< xsd: attribute name = "hireDate" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "inputTypeCode" type = "xsd: Integer" / >
< xsd: attribute name = "isActive" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "isExternal" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "isRole" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "lastName" use = "required" / >
< xsd: attribute name = "managerUserName" type = "xsd:NCName" / >
< xsd: attribute name = "ADO" use = "required" type = "xsd:NCName" / >
< xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "Resource ID" use = "required" / >
< xsd: attribute name = "resourceType" use = "required" type = "xsd: Integer" / >
< xsd: attribute name = use "trackMode" = "required" type = "xsd: Integer" / >
< xsd: attribute name = use "userFlag1" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "userFlag2" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "userNumber1" type = "xsd: Decimal" / >
< xsd: attribute name = "userNumber2" type = "xsd: Decimal" / >
< xsd: attribute name = "userText1" / >
< xsd: attribute name = "userText2" type = "xsd:NCName" / >
< xsd: attribute name = "userText3" type = "xsd:NCName" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Projects" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT ref = "Project" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Project" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT ref = "Baselines" / >
< xsd: ELEMENT ref = "Resources" / >
< xsd: ELEMENT ref = "Tasks" / >
< xsd: ELEMENT ref = "BaselineDetails" / >
< / xsd: SEQUENCE >
< xsd: attribute name = use "UID" = "required" / >
< xsd: attribute name = "active" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "authorized" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "baseFinish" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "baseStart" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "baseTime" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "closed" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "cpmType" = "required" type = "xsd: Integer" / >
< xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "finishImposed" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use 'format' = "required" type = "xsd: Integer" / >
< xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
< xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "name" use = "required" / >
< xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "priority" use = "required" type = "xsd: Integer" / >
< xsd: attribute name = "programs" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "startImposed" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "trackMode" = "required" type = "xsd: Integer" / >
< xsd: attribute name = "userText1" use = "required" / >
< xsd: attribute name = use "userText2" = "required" type = "xsd:NCName" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Base lines" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT ref = "Baseline" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "basic" >
< xsd: complexType >
< xsd: attribute name = "code" use = "required" type = "xsd:NCName" / >
< xsd: attribute name = "use" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "description" use = "required" / >
< xsd: attribute name = "name" use = "required" type = "xsd:NCName" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Resources" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Resource" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Resource" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Curve" / >
< xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
< / xsd: SEQUENCE >
< xsd: attribute name = "availFrom" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "availTo" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "bookingStatus" = "required" type = "xsd: Integer" / >
< xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
< xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = 'requestStatus' use = "required" type = "xsd: Integer" / >
< xsd: attribute name = "Resource ID" use = "required" type = "xsd:NCName" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Tasks" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Task" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Task" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = '0' ref = "Assignments" / >
< xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
< / xsd: SEQUENCE >
< xsd: attribute name = use "UID" = "required" / >
< xsd: attribute name = "baseFinish" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "baseStart" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "baseTime" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "baselineDuration" type = "xsd: Decimal" / >
< xsd: attribute name = "category" / >
< xsd: attribute name = "critical" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use 'fixed' = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use 'key' = "required" type = "xsd: Boolean" / >
< xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
< xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use 'locked' = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "milestone" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "name" use = "required" / >
< xsd: attribute name = "outlineLevel" use = "required" type = "xsd: Integer" / >
< xsd: attribute name = use "percComp" = "required" type = "xsd: Decimal" / >
< xsd: attribute name = using the "proxy" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "status" use = "required" type = "xsd: Integer" / >
< xsd: attribute name = "summarized" use = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "unexpected" use = "required" type = "xsd: Boolean" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Assignments" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Assignment" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Assignment" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = "0" maxOccurs = "unbounded" ref = "Curve" / >
< xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
< / xsd: SEQUENCE >
< xsd: attribute name = use "actualThrough" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "actualWork" = "required" type = "xsd: Decimal" / >
< xsd: attribute name = "baselineWork" type = "xsd: Decimal" / >
< xsd: attribute name = use "estMax" = "required" type = "xsd: Decimal" / >
< xsd: attribute name = use "estPattern" = "required" type = "xsd: Integer" / >
< xsd: attribute name = "Finish" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
< xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "pendActSum" type = "xsd: Decimal" / >
< xsd: attribute name = "pendEstSum" type = "xsd: Decimal" / >
< xsd: attribute name = use "remainingWork" = "required" type = "xsd: Decimal" / >
< xsd: attribute name = "Resource ID" use = "required" type = "xsd:NCName" / >
< xsd: attribute name = "DΘmarrer" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "status" use = "required" type = "xsd: Integer" / >
< xsd: attribute name = "unexpected" use = "required" type = "xsd: Boolean" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Calendar" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = '0' ref = 'Days' / >
< / xsd: SEQUENCE >
< xsd: attribute name = "CalendrierBase" / >
< xsd: attribute name = "lastUpdatedBy" type = "xsd:NCName" / >
< xsd: attribute name = "lastUpdatedDate" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "name" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Days" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = "0" maxOccurs = "unbounded" ref = "Day" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Day" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = '0' ref = "Travel" / >
< / xsd: SEQUENCE >
< xsd: attribute name = "dayOfWeek" type = "xsd:NCName" / >
< xsd: attribute name = "Finish" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "isWorkDay" = "required" type = "xsd: Boolean" / >
< xsd: attribute name = "DΘmarrer" type = "xsd:NMTOKEN" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Travel" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Shift" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Shift" >
< xsd: complexType >
< xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Curve" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = '0' ref = "Segments" / >
< / xsd: SEQUENCE >
< xsd: attribute name = "default" use = "required" type = "xsd: Decimal" / >
< xsd: attribute name = "name" use = "required" type = "xsd:NCName" / >
< xsd: attribute name = use "enter" = "required" type = "xsd: Integer" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Segments" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Segment" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "Segment" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT minOccurs = '0' ref = "Calendar" / >
< / xsd: SEQUENCE >
< xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "rate" use = "required" type = "xsd: Decimal" / >
< xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "BaselineDetails" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT ref = "BaselineDetail" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< xsd: element name = "BaselineDetail" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: ELEMENT maxOccurs = "unbounded" ref = "Curve" / >
< / xsd: SEQUENCE >
< xsd: attribute name = use "baselineCode" = "required" type = "xsd:NCName" / >
< xsd: attribute name = use "costSum" = "required" type = "xsd: Decimal" / >
< xsd: attribute name = "duration" use = "required" type = "xsd: Decimal" / >
< xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
< xsd: attribute name = use "usageSum" = "required" type = "xsd: Decimal" / >
< / xsd: complexType >
< / xsd: element >
< / xsd: Schema >
---------------------------
Here is the procedure for registration of the scheme and rename XMLTYPE tables:
PROCEDURE install_schema (p_schema IN VARCHAR2)
IS
l_res BOOLEAN;
l_nested_table_name VARCHAR2 (50);
l_parent_table_name VARCHAR2 (50);
l_iot_index_name VARCHAR2 (50);
l_continue BOOLEAN: = TRUE;
BEGIN
BEGIN
-load XSD/XML in the table
sipmo_XML_utils.charger_xml ('XSD_DIR', p_schema);
EXCEPTION
WHILE OTHERS THEN
dbms_output.put_line (' error loading of in, err ='|) SQLERRM);
l_continue: = FALSE;
END;
IF l_continue = TRUE
THEN
-Diagram of the removal
BEGIN
dbms_output.put_line ('deleteSchema in progress...) ');
-"projet.xsd".
() DBMS_XMLSCHEMA.deleteSchema
SCHEMAURL = > 'http://www.oracle.com/xsd/ ' | p_schema
, DELETE_OPTION = > dbms_xmlschema. DELETE_CASCADE_FORCE);
EXCEPTION
WHILE OTHERS THEN
dbms_output.put_line (' ko deleteSchema ' |) SQLERRM);
NULL;
END;
END IF; -l_continue = TRUE
-Removal of resources:
IF l_continue = TRUE
THEN
IF (dbms_xdb.existsResource ('/ public /'| p_schema))
THEN
DBMS_XDB.deleteResource ('/ public /'| p_schema);
END IF;
l_res: = dbms_xdb.createResource ('/ public /'| p_schema, BFILENAME ('XSD_DIR', p_schema));
IF l_res
THEN
dbms_output.put_line ('createresource OK');
ON THE OTHER
dbms_output.put_line ('createresource KO');
END IF;
END IF; -l_continue = TRUE
-Schema of creation of the:
IF l_continue = TRUE
THEN
BEGIN
dbms_output.put_line ('REGISTERSCHEMA in progress...) ');
DBMS_XMLSCHEMA. REGISTERSCHEMA)
SCHEMAURL = > 'http://www.oracle.com/xsd/ ' | p_schema
, SCHEMADOC = > BFILENAME ('XSD_DIR', p_schema)
, CSID = > NLS_CHARSET_ID ('AL32UTF8')
local = > TRUE
, genTypes = > TRUE
, genBean = > FALSE
genTables = > TRUE);
EXCEPTION
WHILE OTHERS THEN
dbms_output.put_line (' ko REGISTERSCHEMA ' |) SQLERRM);
l_continue: = FALSE;
END;
END IF; -l_continue = TRUE
COMMIT;
IF p_schema = "projet.xsd".
AND l_continue = TRUE
THEN
dbms_output.put_line (' XML rename tables ' | p_schema);
-First... the enventuelle dropper table main "WORKBECH_PROJECT."
BEGIN
EXECUTE IMMEDIATE ' drop table 'WORKBENCH_PROJECT "";
EXCEPTION
WHILE OTHERS THEN
NULL;
END;
-Resource table
Select table_name
in l_nested_table_name
of user_nested_tables
where parent_table_column = ' "XMLDATA". "" "" PoolResources '. "" PoolResource' '
and parent_table_name like '% WORKBENCH_PROJECT ';
EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_RESSOURCES ';
Select index_name
in l_iot_index_name
from user_indexes
where table_name = 'PROJET_RESSOURCES '.
and index_type = 'IOT - TOP';
Index of IMMEDIATE'alter EXECUTE ' ' |. ' l_iot_index_name |' "and rename it PROJET_RESSOURCES_I1';
-Table projects/tasks
Select table_name
in l_nested_table_name
of user_nested_tables
where parent_table_column = ' "XMLDATA". "Projects '." "Project '." "" Task"". "" The task""
and parent_table_name like '% WORKBENCH_PROJECT ';
EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_TACHES ';
Select index_name
in l_iot_index_name
from user_indexes
where table_name = 'PROJET_TACHES '.
and index_type = 'IOT - TOP';
EXECUTE IMMEDIATE ' alter index ' ' |. ' l_iot_index_name |' "and rename it PROJET_TACHES_I1';
-Table of the project/tasks/Activities and (+ main table)
Select table_name, parent_table_name
in l_nested_table_name
l_parent_table_name
of user_nested_tables
where parent_table_column = ' "XMLDATA". "Projects '." "Project '." "" "" BaselineDetails '. "" "" "BaselineDetail '." " Curve"'
and parent_table_name like '% WORKBENCH_PROJECT ';
EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_ACTIVITES ';
Select index_name
in l_iot_index_name
from user_indexes
where table_name = 'PROJET_ACTIVITES '.
and index_type = 'IOT - TOP';
EXECUTE IMMEDIATE ' alter index ' ' |. ' l_iot_index_name |' "and rename it PROJET_ACTIVITES_I1';
-Main table WORKBENCH_PROJECT
EXECUTE IMMEDIATE "Rename" ' | "" l_parent_table_name | "" "to WORKBENCH_PROJECT ';
dbms_output.put_line ('rename XML tables... end');
ON THE OTHER
dbms_output.put_line (' rename XML tables...) NOT DONE ");"
END IF; -p_schema = "projet.xsd".
END install_schema;
---------------------------------------
Here is the procedure of inserting data into XMLTYPE table (where I get the error)
* insert into WORKBENCH_PROJECT values (xmltype (bfilename('XML_DIR','P21002635_2.xml'), nls_charset_id ('AL32UTF8'))); *
+ In my idea, I think I should load the full XML in my table XMLTYPE WORKBENCH_PROJECT... +.
and more and then interrogate him with better performance... more
--------------------------------------
Note that the same XML file is already loaded into a table containing an XMLTYPE column...
So, I really wonder if I need to do both?
----------------------------------------
In any case, I hope that you will be able to help me... and that my explanation is clear...
Thanks in advance,
OlivierOliver
I don't know where you got the impression that I said that the DOM would be better. It will be definitely worse. The only advantage of the evaluation of DOM based (or functional) is that it can handle a much wider range of XQuery and XPath expressions. However there is nothing in what I saw in your examples the SQL execution path is not be be able to manage the only way you get the performance you need is to get the work of path of execution of SQL. To get the job of re - write, you will need to avoid wildcards and get the fix for the bug.
I hate to disappoint you, but your XML schema is actually quite simple, it is certainly not in a class, that I would not complex, for recording results in a hierarchical structure very simple, unique, with 42 nested tables, if you want to see an example of something I would consider as complex search the Web for the FpML or NIEM schemas , recording these patterns result in recursive structures with multiple nested tables 1000!
I see nothing in your XML schema that would make the use of wildcard characters required (with the exception of running in this bug). For tasks and Instance/tasks / * are identical in your use case as a tasks element can contain one or more elements of task, not do I see anything that would make me think that some how transform XML CSV would make it easier to load.
My number 1 recommendation is to apply the 10.2.0.4.0 patch or upgrade to GR 11, 1 material. According to your deadlines, you can also consider 11 GR 2 beta.
-Mark
Published by: mdrake on April 10, 2009 14:28
-
Hello
I have a requirement to extract data from XML and insert in a custom table.
XML structure is
< A >
< Column1 >
< Column2 >
< Column3 >
< Column4 >
< column > 5
< A >
< A1 >
< Column1 >
< Column2 >
< Column3 >
< Column4 >
< column > 5
< A1 >
.
.
.
.
< a >
< Column1 >
< Column2 >
< Column3 >
< Column4 >
< column > 5
< a >
I need to extract all the values in the column and insert it into a custom table.
Number of nodes one will increase every day, and columns can be of the order of 50-100.
With the help of EXTRACTVALUE and bulk collect I m doing this process, but taking almost 2 hours for the processing of 3000 records.
Please let me know is there better way (in terms of performance) to extract XML data?
Thank you
Kumar.
Why the node is called as A1, A2... One? Why can it not be Just A? Here's an example of how to represent XML report and analyzed data to a relational structure.
SQL> with t 2 as 3 ( 4 select xmltype 5 ( 6 '
7
' 38 ) xmldata 39 from dual 40 ) 41 select t1.* 42 from t 43 , xmltable 44 ( 45 '/table/row' passing xmldata 46 columns 47 empno number path 'empno', 48 ename varchar2(10) path 'ename', 49 doj varchar2(10) path 'doj', 50 sal number path 'sal' 51 ) t1; EMPNO ENAME DOJ SAL ---------- ---------- ---------- ---------- 1 ram 01-01-2016 10000 2 karthick 01-01-2016 10000 3 subha 01-01-2016 10000 4 vimal 01-01-2016 10000 5 vijay 01-01-2016 100008
131 9ram 1001-01-2016 1110000 1214
192 15karthick 1601-01-2016 1710000 1820
253 21subha 2201-01-2016 2310000 2426
314 27vimal 2801-01-2016 2910000 3032
375 33vijay 3401-01-2016 3510000 36 -
Hello! Below you will find a typical function we use in our data base. I thought that I can improve it using WHERE NOT EXISTS and BACK IN, but I can't understand how to return a default value
value such as-1 if the record already exists. I'm trying to optimize and make the inserts in a single statement.
Thanks in advance
CREATE OR REPLACE FUNCTION "Some"."FUNC_TEST_NEW" ( v_Par1 Table1.Col1%Type, v_Par2 Table1.Col2%Type, v_Par3 Table1.Col3%Type, v_Par4 Table1.Col4%Type,) RETURN NUMBER AS inserted_id NUMBER; rec_cnt NUMBER; BEGIN --!!! DEFAULT !!! inserted_id:= -1; --CHECK FOR EXISTENCE SELECT COUNT(*) INTO rec_cnt FROM Table1 WHERE LOWER(Col1) = LOWER(v_Par1); --INSERT IF rec_cnt = 0 THEN --select sequence value SELECT MySequence.nextVal INTO inserted_id FROM dual; -- insert INSERT INTO Table1 ( Col1,Col2,Col3,Col4,Col5,Col6 ) VALUES( inserted_id, v_Par1,v_Par2, v_Par3, v_Par4, SYSTIMESTAMP); COMMIT; -- return sequence value of the newly inserted record. RETURN inserted_id; ELSE -- already exists, return DEFAULT RETURN inserted_id; END IF; EXCEPTION WHEN OTHERS THEN --- END;
Create a unique index on lower (col1)
Rewrite your code as below:
CREATE OR REPLACE FUNCTION "some." "" FUNC_TEST_NEW ".
(v_Par1, Table1.Col1%Type,
v_Par2 Table1.Col2%Type,
v_Par3 Table1.Col3%Type,
v_Par4 Table1.Col4%Type)
RETURN AS NUMBER
inserted_id NUMBER;
BEGIN
Start
-insert
INSERT INTO Table1 (Col1, Col2, Col3, Col4, Col5 Col6)
VALUES (MySequence.nextVal, v_Par1, v_Par2, v_Par3, v_Par4, SYSTIMESTAMP)
return col1 in inserted_id;
COMMIT;
When DUP_VAL_ON_INDEX then
inserted_id: = - 1;
end;
Return inserted_id;
END;
Maybe you are looking for
-
I bought a new Toshiba Dynadock. As I uderstood documentation it should feed two front usb even when the host computer is in standby mode or disconnected ports. It doesn't seem to work for me. Devices connected to everything (including forward) ports
-
new upgrade status Atrix changed today, explain
Hi, I see an update said plans future details will come, that means we are still developing for ICS or can we wait for a refund offer?
-
Reset an old iPad increases its speed? NOT SOLVED!
My husband has replaced its old iPad 2 / 16 gb for a new iPad Air 2 / 64 gb. I would like to take his old iPad and strictly use for my memory-hogging games like Bash Bingo, secret society, The Room, etc. If I do a full reset, it will give me enough s
-
Try to install SP1 on an old laptop without an internet connection.
I use an old XP laptop and I try to install SP1. There is no internet connection. I downloaded the SP1 and transferred the file, but it tries to download the rest of the files. Is there a complete file I can download and install it? I have the SP2 an
-
Dear friends, first of all, I'm new in multisim, and I want to do a counter by IC 4029, but when I plugged it "as you can see in the attachments", he did not answer R there any error I made, please correct me. I have attached the file, "if any want t