I need to write data from xmldom.DOMNode variable to a varchar2 table field, but xmldom.writeToBuffer produces indentations that waste a lot of space. Is there any way to manage identations, preferably to get rid of them at all?
[/code]
declare
doc xmldom.DOMDocument;
applNode xmldom.DOMNode;
subApplNode xmldom.DOMNode;
element xmldom.DOMElement;
result varchar2(4000);
begin
doc := xmldom.newDOMDocument();
element := xmldom.createElement(doc, 'Application');
applNode := xmldom.appendChild(xmldom.makeNode(doc),
xmldom.makeNode(element));
element := xmldom.createElement(doc, 'SubApplication');
applNode := xmldom.appendChild(applNode,
xmldom.makeNode(element));
xmldom.writeToBuffer(doc, result);
end;
[/code]
Now the length of result is 93 bytes. Actually without any loss of information it may (and must!) be 87.
In my specific case (document is far more complex ) the difference is more than 100 bytes and I need them badly as the third party application requires that xml to be inserted into varchar2 field.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.