Try this:
create table p (
xml varchar2(4000) not null);
declare
p xmlparser.parser;
doc xmldom.DOMDocument;
e xmldom.DOMElement;
t xmldom.DOMText;
n xmldom.DOMNode;
b varchar2(4000);
begin
doc := xmldom.newDOMDocument;
xmldom.setVersion(doc,'1.0');
e := xmldom.createElement(doc,'tag');
t := xmldom.crateTextNode(doc,'Text');
n := xmldom.appendChild(xmldom.makeNode(doc),xmldom.makeNode(e));
n := xmldom.appendChild(n,xmldom.makeNode(t));
xmldom.writeToBuffer(doc,b);
insert into p values (b);
xmldom.freeDocument(doc);
end;
/
The result should be:
<?xml version = '1.0'?>
<tag>Text</tag>
Bye.
Olivier escribió: