Hello, I've noticed some curious behavior with regard to creating new XML content, and was wondering if anyone could shed some light. I start with an existing document, read it in and note that all node QName objects have both a namespace URI and a namespace prefix.
But when I take any given node and use the generated XmlBeans "addNewXYZ" (where XYZ is one of my schema elements) to add new content and then check the QName object, the namespace URI attribute for the new content gets valued but the namespace prefix is an empty string. An exception gets thrown if I try to set it explicitly. And then when I write out the XML document and read it in again, that newly-added content has the namespace prefix. I need the namespace prefix to do things like build Xpath queries, so it is critical that it be present. I suppose I could just go back to the root element every time to get it (assuming the document has the same namespace used throughout, which is true in this case but not in general). But that seems kludgey. Thanks for any help or information. Regards, Chris Dole SAS Institute, Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

