I've found that removeNamespace() doesn't work if there are existing attributes or elements using that namespace... have you tried first deleting any of these and then tried to remove the namespace? Also, when you're calling removeNamespace, how are you constructing the Namespace instance to pass in to the function?
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of shagenlo Sent: Monday, December 04, 2006 9:12 PM To: [email protected] Subject: [flexcoders] removeNamespace() and the default namespace in XML Hello, I realize this topic was covered a bit in a thread titled "Namespace hell", however I didn't see a resolution to a lingering question. Is there any way to use the removeNamespace() method of the XML class to remove the default namespace (the namespace without a prefix)? I would like to do this, because i have an object heirarchy which represents an unstructured XML document (not a recordset). In serializing the object structure, the new XML can get littered with namespace declares, it would be easier to simply remove the original default namespace and be done with it. Name collisions are not a concern for me, but the fact that removeNamespace() doesn't work with the default namespace is. Is there an answer other than RegEx on the xml string? Cheers, Steve

