Questions tagged [jibx]

JiBX is a tool for binding XML data to Java objects.

JiBX is a tool for binding XML data to Java objects. It's extremely flexible, allowing you to start from existing Java code and generate an XML schema, start from an XML schema and generate Java code, or bridge your existing code to a schema that represents the same data. It also provides very high performance, outperforming all other Java data binding tools across a wide variety of tests.

Project Homepage: http://jibx.sourceforge.net/

Another useful resource: Jibx Tutorial Part 1 Jibx Tutorial Part 2

185 questions
11
votes
4 answers

Simple Java Xml to POJO mapping/binding?

I'm trying to figure out the simplest way to map an xml file to to a plain old java object. Note: That in my example the xml doesn't quite match up with my intended POJO. ///////// THE XML
vicsz
  • 9,552
  • 16
  • 69
  • 101
7
votes
2 answers

JAXB - Creating modules for reuse

Does JAXB support modular code generation? Most of my background is with JibX for XML marshalling, but for legacy reasons our firm is using JAXB. One feature that was available for JIBX was modular code generation. Say I have a main schema but I…
Roy Truelove
  • 22,016
  • 18
  • 111
  • 153
7
votes
2 answers

Is it safe to use bytecode enhancement techniques on classes that might be serialized and why?

I haven't tried this yet, but it seems risky. The case I'm thinking of is instrumenting simple VO classes with JiBX. These VOs are going to be serialized over AMF and possibly other schemes. Can anyone confirm or deny my suspicions that doing…
gtrak
  • 5,598
  • 4
  • 32
  • 41
7
votes
2 answers

How to generate XML from XML schema in java and feed data in it?

I am developing part of a web app which takes an XML schema as input to generate an XML file. There is also data to be put into the XML tags in an ordered way. For example, If I have an ArrayList of 100 numbers, say, 1 to 100 and the .xsd looks…
LT_Chen
  • 113
  • 1
  • 2
  • 7
6
votes
1 answer

JiBX unmarshalling - is it possible to tell JiBX to ignore the order of elements?

Is there a way to get by this? For example, my XML: new group idext 1 2 when unmarshalling, goes without errors, but when I change order:
Trick
  • 3,779
  • 12
  • 49
  • 76
5
votes
3 answers

How to create Java objects from XML tags which are referring each other?

I have an XML which has tags corresponding to three types of Java objects which would be created from the XML. The objects are of the form: A - static Map - String name - String aInfo1 - String aInfo2 B - static Map - String…
Ashish
  • 3,028
  • 5
  • 28
  • 35
5
votes
1 answer

jibx: Missing required object exception

I'm useing JiBX to marshall some Classes. It works well, until i get a IllegalStateException java.lang.IllegalStateException: Missing required object at org.jibx.runtime.impl.MarshallingContext.pushObject(MarshallingContext.java:1181) at…
itshorty
  • 1,522
  • 3
  • 17
  • 39
5
votes
3 answers

Maven: metadata xml files downloaded often from remote repositories

I'm using Maven to handle a Java project. I thought that Internet connectivity was only needed in the 1st compile to download the required libraries from the remote repositories, but I get several download messages whenever I compile code. Messages…
Alan Evangelista
  • 2,888
  • 6
  • 35
  • 45
4
votes
3 answers

JiBX on Android (or any other build-time bytecode manipulating library)

I'm considering the use of JiBX for a project that will have to run on both Blackberry and RIM. While it seems like J2ME use of JiBX has been considered by the community (as per JiBX jira tickets), Android is relatively new. The question is,…
Paul Milovanov
  • 706
  • 4
  • 18
4
votes
1 answer

Jibx - how to unmarshal/marshal tag with value and attribute?

12 72 Sorry Guys, I did not meant to be lazy. Ok Here is the question: I have xml structure with above block of xml which some tags has both value and attribute…
Gord
  • 41
  • 4
4
votes
1 answer

How to import an XML schema into the "no namespace"

I have a schema here where I am trying to include/import another schema that has no namespace (and this cannot be changed because it comes from another vendor and it would no longer validate their XML). Here is the first Schema:
Zombies
  • 25,039
  • 43
  • 140
  • 225
4
votes
1 answer

How can I unmarshal an XML document with an attribute that allows multiple enumeration values in jibx?

I want to use Jibx to unmarshal the following XML (stored in a file called test.xml):
kmp
  • 10,535
  • 11
  • 75
  • 125
3
votes
2 answers

JiBX: How do I keep using interfaces in my code?

How can I keep my using interfaces in classes I want to use JiBX binding with? Example: I have this very simple model in java: public interface A { B getB(); void setB(B b); } public interface B { String getData(); void…
Ran Biron
  • 6,317
  • 5
  • 37
  • 67
3
votes
0 answers

How to disable namespace validation in JiBX?

I have a JiBX binding file that specifies namespaces. However, I want to turn off namespace validation so that even an XML message with invalid namespace could be unmarshalled. I have a binding file like the following:
Tommy Siu
  • 1,265
  • 2
  • 10
  • 24
3
votes
1 answer

How to marshall an objectgraph with Java XML binding to a specific depth?

being a newbie to Java XML binding i am facing a challenge. Let say i have a scenario where my domain model is constructed and i want to marshall this domain to an xml structure. Now i want to provide different unmarshall path's: Marshall the whole…
Marco
  • 15,101
  • 33
  • 107
  • 174
1
2 3
12 13