Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XMLDOM apprentice

0 views
Skip to first unread message

Arthur 51

unread,
Dec 31, 2009, 6:03:46 AM12/31/09
to
Hi.
I am using XMLDOM with PL/SQL.
I have successfully developed a function that creates the XML
EG.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <Root >
...
...
...
</Root>

But the <root> needs to have something like the following
- <Root xmlns="http://www.domain.com/package/2006/content-types"
xmlns=http://www.domain.com">

Any advice very much appreciated.

Thanks.

Arthur


Martin Honnen

unread,
Dec 31, 2009, 7:30:11 AM12/31/09
to
Arthur 51 wrote:

> But the <root> needs to have something like the following
> - <Root xmlns="http://www.domain.com/package/2006/content-types"
> xmlns=http://www.domain.com">

You can only have one xmlns="something" on a single element, two are not
allowed.
As for creating <Root xmlns="http://example.com/foo"></Root>, in the W3C
DOM Level 2 or 3 world you can use (in Javascript syntax)
var el = doc.createElementNS("http://example.com/foo", "Root");
In the MSXML world you would use createNode instead
var el = doc.createNode(1, "Root", "http://example.com/foo");

See also
http://msmvps.com/blogs/martin_honnen/archive/2009/04/13/creating-xml-with-namespaces-with-javascript-and-the-w3c-dom.aspx
http://msmvps.com/blogs/martin_honnen/archive/2009/04/15/creating-xml-with-namespaces-with-javascript-and-msxml.aspx

Whether any of that applies to the system you work with "PL/SQL" I have
no idea at all, you will need to look for a forum or newsgroup or
mailing list dedicated to PL/SQL to find some expertise on that.


--

Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/

0 new messages