XML tags in upper or lower case ?
824547Apr 8 2011 — edited Apr 14 2011Hi,
I'm a beginner in xml...
Here's the situation :
1/ I've created this table :
CREATE TABLE PCDB.ICEDA01_XMLIN
*(*
DATA_XML CLOB,
FILENAME VARCHAR2(255 BYTE),
*)*
2/ I've inserted in the DATA_XML field this content (xml file) using Sql*Loader :
<?xml version="1.0" encoding="UTF-8"?>
<iceda_to_externaltool_interface_requestor>
<file_information version="1.0.0" description="xxx"/>
<interface description="aaa" emitter="x" receiver="y">z</interface>
<parameters>
<input>
<user>
<full_name>My Name</full_name>
<login>My login</login>
</user>
</input>
</parameters>
</iceda_to_externaltool_interface_requestor>
3/ I try to read the root :
select extract(xmltype(DATA_XML),'/') from ICEDA01_XMLIN;
and the result is correct :
+<iceda_to_externaltool_interface_requestor xmlns="requestorfile.xml.externaltool.interface.iceda.thalesaleniaspace.com">...+
3/ I try to read the file_information \ version :
select extract(xmltype(DATA_XML),'/iceda_to_externaltool_interface_requestor/file_information/version') from ICEDA01_XMLIN;
and the result is incorrect (EMPTY)
why ?
My new test is to insert the tags in uppercase :
*<?xml version="1.0" encoding="UTF-8"?>*
*<ICEDA_TO_EXTERNALTOOL_INTERFACE_REQUESTOR>*
*<FILE_INFORMATION VERSION="1.0.0" DESCRIPTION="xxx"/>*
*<INTERFACE DESCRIPTION="x" EMITTER="y" RECEIVER="z">3</INTERFACE>*
*<PARAMETERS>*
*<INPUT>*
*<USER>*
*<FULL_NAME>HERVE PRADON</FULL_NAME>*
*<LOGIN>PRADONH</LOGIN>*
*</USER>*
*</ICEDA_TO_EXTERNALTOOL_INTERFACE_REQUESTOR>*
3/ I try to read the root :
select extract(xmltype(DATA_XML),'/') from ICEDA01_XMLIN;
and the result is correct :
+<ICEDA_TO_EXTERNALTOOL_INTERFACE_REQUESTOR>...+
3/ I try to read the file_information \ version :
select extract(xmltype(DATA_XML),'/ICEDA_TO_EXTERNALTOOL_INTERFACE_REQUESTOR/FILE_INFORMATION/VERSION') from ICEDA01_XMLIN;
and the result is correct...
select extract(xmltype(DATA_XML),'/iceda_to_externaltool_interface_requestor/file_information/version') from ICEDA01_XMLIN;
and the result is incorrect (EMPTY)
Any idea or suggestion ?