and the code for Item (Item.java) is placed next to binding.xml
package example24;
public class Item
{
private String id;
private int quantity;
private Float price;
public String getId()
{ return id; }
public void setId(String id)
{ this.id = id; }
public int getQuantity()
{ return quantity; }
public void setQuantity(int quantity)
{ this.quantity = quantity; }
public Float getPrice()
{ return price; }
public void setPrice(Float price)
{ this.price = price; }
}
And to generate the binding here is what i do and the output i get
C:\jibx\tutorial>java -jar C:\jibx\lib\jibx-bind.jar example24\binding.xml
Error: Cannot find information for class example24.Item; on mapping element
at (
line 4, col 71, in binding.xml)
Error running binding compiler
org.jibx.runtime.JiBXException: Binding binding.xml is unusable because of
valid
ation errors
at org.jibx.binding.Utility.loadBinding(Utility.java:358)
at org.jibx.binding.Utility.loadFileBinding(Utility.java:420)
at org.jibx.binding.Compile.compile(Compile.java:217)
at org.jibx.binding.Compile.main(Compile.java:384)