Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8843037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:06:59+00:00 2026-06-14T11:06:59+00:00

I have an XML message I am attempting to parse using GXT and AutoBeans.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:07:00+00:00Added an answer on June 14, 2026 at 11:07 am

    GXT’s XmlReader sits on top of the build in XML parser that exists in the browser itself. It uses the com.google.gwt.xml.XML module in GWT to gain relatively consistent access to the XML nodes across all browsers, rather than building its own XML parser. By using the built-in implementation in the browser, GXT gets access to the native parser – and it turns out browsers are very good at parsing XML, since that’s what they do all day, loading webpages.

    Then, GXT has its own query engine to find nodes, in a query language that uses a combination of XPath and CSS3. This mix is to allow it to work well for looking for nodes in the html itself, as well as looking for nodes in xml documents. This is designed to be consisten

    However, browsers have inconsistent support (I’m looking at you, IE) for namespaces, and so the XML module in GWT doesn’t know how to talk about namespaces, and the DomQuery engine doesnt really either. Additionally, the : operator, which in XML means ‘namespace’, is used to mean ‘psuedo-selector’ in CSS, so the query language would be a little vague if it supported this directly: The string foo:bar could either mean “All elements with name foo that match psuedo-selector bar“, or “All elements with name bar in the namespace foo“.

    So enough with the problem: whats the solution? At present, there isn’t a good one for namespaced elements in IE6/IE7/IE8 – one part inconsistencies in the browsers and one part lack of ugly workaround in GXT means that you can’t read out the elements directly. For all other browsers, to select elements like namespace:eltname, just use @PropertyName("eltname").

    One other note: Due to the fact that attributes don’t have psuedo-selectors, you can select them – @PropertyName("namespace:attrname") will correctly read out values in the attribute in <element namespace:attrname="value">.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some XML that has creating using an XmlDocument object in C#. I
I have an xml message that I need to parse (No control of format)
I have an xml message that is in the older schema (xsd) format. My
I have XML in the following form that I want to parse with PHP
I have XML that I need to parse but have no control over the
I have XML in the form of a String that contains <message>HELLO!</message> How can
I have a wide-character XML message that I need to send over a Win32
I have two applications written in Java that communicate with each other using XML
I have code like this: // Take the xml message and turn it into
I have a Java program in which I have to validate an XML message

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.