I have an XML message I am attempting to parse using GXT and AutoBeans. The root node of my XML has a namespace declaration and it appears that the AutoBean parser cannot read the XML.
I set up the root of the AutoBean object graph with a PropertyName specification:
@PropertyName("record")
RecordObject getRecord();
But when my XML looks like this:
<record xmlnms:ab="http://anynamespace.com">
<ab:name>SampleName</ab:name>
<ab:email>sample@email.com</ab:email>
</record>
The AutoBean can't seem to decode the XML. If the namespace declaration is not present, the AutoBean can find the root record object. Is there some other argument or something I can specify to tell the AutoBean to only look at the element name?
What I have tried
I tried to parse with the namespace stripped out and it works but in my real use case I am not able to remove the namespace declaration. I have also tried to specify the namespace in the @PropertyName
attribute - @PropertyName("record xmlnms:ab=\"http://anynamespace.com\"")
- but that does not work (nor did I expect it to).
EDIT
I am using GXT's XmlReader to try and parse the XML.