Hi Friends,
in the below xml
i use DomNode approach to create the core XML
and use the below query
SELECT XMLSERIALIZE ( DOCUMENT xmlroot
(XMLELEMENT (
"ns1:DeriveCoverageRequest",
xmlattributes (
'urn:xyz:ccw:config:common:data' AS "xmlns",
'urn:xyz:ccw:config:msa:data' AS "xmlns:ns1"),
l_xmltype)
,version '1.0" encoding="UTF-8' ,STANDALONE YES
)
AS CLOB)
into l_value
and the XML look like
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns1:DeriveCoverageRequest xmlns="urn:xyz:ccw:config:common:data" xmlns:ns1="urn:xyz:ccw:config:msa:data">
<majorLine> --
<lineId>47285</lineId>
<itemName>xyz15454</itemName>
<quantity>5</quantity>
<minorLine>
<lineId>47293</lineId>
<itemName>15454-CC-FTA</itemName>
<quantity>5</quantity>
<itemPath>xyz15454:15454-</itemPath>
</minorLine>
</majorLine>
</ns1:DeriveCoverageRequest>
from dual;
now i need to add ns1: with the majorLine tag so it should be like
<ns1:majorLine>
</ns1:majorLine>
Code for creating this majorLine is
l_major_line_node :=
DBMS_XMLDOM.
appendChild (
l_root_node,
DBMS_XMLDOM.
makeNode (DBMS_XMLDOM.createElement (l_domdoc, 'majorLine')));
and i modified like
l_major_line_node :=
DBMS_XMLDOM.
appendChild (
l_root_node,
DBMS_XMLDOM.
makeNode (DBMS_XMLDOM.createElement (l_domdoc, 'ns1:majorLine')));
but it did not work. could you please suggest some idea on this