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

  • SEARCH
  • Home
  • 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 610207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:39:00+00:00 2026-05-13T17:39:00+00:00

Is there a way to get by this? For example, my XML: <group> <idExt>new

  • 0

Is there a way to get by this?

For example, my XML:

<group>
    <idExt>new group idext</idExt>
    <user-id>1</user-id>
    <parent-id>2</parent-id>        
</group>

when unmarshalling, goes without errors, but when I change order:

<group>
    <user-id>1</user-id>
    <parent-id>2</parent-id>
    <idExt>new group idext</idExt>
</group>

it fails org.jibx.runtime.JiBXException: Expected "group" end tag, found "idExt" start tag (line 4, col 2).

My unmarshalling (implementing Struts2 ContentTypeHandler interface):

public void toObject(Reader in, Object target) {
    try {
        IBindingFactory bf = BindingDirectory.getFactory(target.getClass());
        IUnmarshallingContext umc = bf.createUnmarshallingContext(); 
        umc.setDocument(in); 
        // This un-conditional cast is the current way that JibX unmarshalls to an // already instantiated object - YUCK 
        ((IUnmarshallable)target).unmarshal(umc); 
    } catch (JiBXException e) {
        throw new RuntimeException(e);
    }
}

And binding:

<binding>       
    <mapping name="group" class="GroupVO" >
        <value name="id" field="id" usage="optional"/>
        <value name="idExt" field="idExt" usage="optional"/>
        <value name="active" field="active" usage="optional"/>
        <value name="created-at" field="dateCre" usage="optional"/>
        <value name="updated-at" field="dateChg" usage="optional"/>
        <value name="deleted-at" field="dateDel" usage="optional"/>
        <value name="user-id" field="userId" usage="optional" />
        <value name="parent-id" field="parentId" usage="optional" />
    </mapping>
</binding>

So, is possible for JiBX to ignore tag order?

  • 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-05-13T17:39:00+00:00Added an answer on May 13, 2026 at 5:39 pm

    Add an ordered="false" to your mapping element in the binding:

    <binding>        
        <mapping name="group" class="GroupVO" ordered="false"> 
            <value name="id" field="id" usage="optional"/> 
            <value name="idExt" field="idExt" usage="optional"/> 
            <value name="active" field="active" usage="optional"/> 
            <value name="created-at" field="dateCre" usage="optional"/> 
            <value name="updated-at" field="dateChg" usage="optional"/> 
            <value name="deleted-at" field="dateDel" usage="optional"/> 
            <value name="user-id" field="userId" usage="optional" /> 
            <value name="parent-id" field="parentId" usage="optional" /> 
        </mapping> 
    </binding> 
    

    For more info, see the documentation for JiBX.

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

Sidebar

Related Questions

Say I have this constructor: /// <summary> /// Example comment. /// </summary> public SftpConnection(string
I'm trying to create an XML output file to import into another program. The
I'm trying to use the 'For Xml Path' T-SQL to generate a comma separated
I am using com.ctc.wstx.stax.WstxOutputFactory to generate XML. I am running wstx-asl-3.2.4 I need to
I have an XSLT transform I am using to process an XML file, inserting
I have a class: public class Car { public string Model {get;set;} public string
I am by no means a master with Ruby and am quite new to
I have a listview with a dozen of rows binded to xml. I'd like
I hope I asked that correctly. I am trying to figure out what element.sourceline
Was I was previously messing with Silverlight and RIA, I was using a an

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.