[XML-SIG] question about setAttributeNS()
Keith Beattie
KSBeattie at lbl.gov
Thu Jan 8 17:22:18 EST 2004
Hello,
When adding an attribute within a new namespace to an element, you need to
make two calls to setAttributeNS() in order for the namespace definition to be
added to the element (one for the new namespace and one for the new
attribute). This is different than createElementNS() which adds the namespace
attribute for you, when creating a new element in a new namespace.
It seems odd to me that creating a new attribute in new namespaces take two
calls, while creating new elements in a new namespace takes only one call. Am
I missing something and is there a reason for this, or is this just an
idiosyncrasy of the DOM API?
Thanks,
ksb
More information about the XML-SIG
mailing list