The addNamespace() method allows you to add a namespace declaration to
the element but does not add the element to the namespace. You can now
howerever use this namespace for any child elements.

> And if so, is there any reason no not just do addElement("w:fonts") instead
> as that is shorter code? Or in that case is dom4j not aware of the namespace
> mapping?

Yes, that would be possible if 'w' has already been mapped.

However currently the method clearly expects a name and not a
qualified name and to change this method to use a qualified name would
create dependencies that are unnecessary and I think philosophically
wrong.

Regards,
Edwin


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to