David,
you add your <Styles> element with no namespace information, This means that your <Styles> element doesn't belong to a namespace, that's why the default namespace is set to "". However, I think you want your <Styles> element to be part of the default namespace of your workbook, so you'll have to add your <Styles> element with the correct namespace:
styles = wb.addElement("Styles", "urn:schemas-microsoft-com:office:spreadsheet");
this should do the trick
regards, Maarten
David Thielen wrote:
Hi;
I have a root node with a number of namespaces including one with no prefix:
wb = doc.addElement("Workbook");
wb.addNamespace("", "urn:schemas-microsoft-com:office:spreadsheet");
wb.addNamespace("o", "urn:schemas-microsoft-com:office:office");
wb.addNamespace("x", "urn:schemas-microsoft-com:office:excel");
wb.addNamespace("ss", "schemas-microsoft-com:office:spreadsheet");
wb.addNamespace("html", "http://www.w3.org/TR/REC-html40");
When I add an element to that element, I get:
styles = wb.addElement("Styles"); è <Styles xmlns="">
How can I get rid of the xmlns=""?
Thanks - dave
------------------------------------------------------- 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 [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user