If I want to create an element and it's attribute of a particular namespace,
Why should id use:

String namespaceURI = "http://someuri.something";;
String elementName = "ns:someElement";
String attName = "ns:someAttribute";
String attValue = "someAttValue";


Element e = createElementNS( namespaceURI, elementName );
e.setAttributeNS( namespaceURI, attName, attValue );

instead of

Element e = createElement( elementName )
e.setAttribute( attName, attValue );

?


And finally, why doesn't Xerces' XML serializer print out the namespace
prefix if you use the first method?



Dane Foster


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to