Hi,
I'm using the jaxb annotations to generate our schema from annotated
java classes. Currently, there is no namespace specified. Going
forward, we would like to add a namespace at the package level or via
namespace attribute to an appropriate jaxb annotation. (All the
objects are in one namespace)
Question is, if that were done, how to unmarshal earlier xml content
which wouldn't have the namespace. My tests show that those fail as
the namespace is not specified. I didn't find a way to specify
something like a default namespace in the unmarshaller. Is there
anyway to do this?.
If not, is there a way to do this by first converting the xml to a dom
tree and then changing the dom? My brief attempts at this failed as
the namespace seems to be much more then just adding an xmlns
attribute to an element. Maybe I have to somehow transform each
element in the tree. I don't have a clear idea yet and any
help/suggestions would be greatly appreciated.
thanks
sundar