Regarding schema validation and dbms_xmlparser, dbms_xmldom [message #572861] |
Tue, 18 December 2012 04:08 |
|
vikramschandel
Messages: 4 Registered: April 2012 Location: Hyderabad
|
Junior Member |
|
|
Hi All,
Recently I came across one scenario, where I need to register XSD and validate all incoming xml agaist registered XSD and then access its contents and process them as per business needs.
To accomplish this:
1. Simply I have registered XSD using registerschema .
2. To validate xmls, used schemaValidate .
3. Once this is done then to fetch value from xml, I used below statement:
SELECT EXTRACTVALUE (COLUMN_VALUE, '/details/emp_id') "Employee_ID"
FROM TABLE
(XMLSEQUENCE
(XMLTYPE
('<?xml version="1.0"?>
<employee>
<details>
<emp_id>1001</emp_id>
</details>
</employee>'
).EXTRACT ('/employee/details')
)
) t;
This works fine.
But I was browsing the same requirement over forum, got solutions related to DBMS_XMLPARSER and DBMS_XMLDOM.
I tried to go through its details but didnt get much idea on the same.
Can anyone please help me to understand about use of dbms_xmlparser and dbms_xmldom and about DOM.
In which scenario we need to use them?
Thanks
Vikram
|
|
|