xml-binding

JAXB - Remove 'standalone="yes"' from generated XML

Hi people, Do you know of a JAXB setting to prevent standalone="yes" from being generated in the resulting XML? <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ...

Binding XML in Sliverlight without Nominal Classes

Lets say I have a simple chunck of XML:- <root> <item forename="Fred" surname="Flintstone" /> <item forename="Barney" surname="Rubble" /> </root> Having fetched this XML in Silverlight I would like to bind it with xaml of this ilke:- <ListBox x:Name="ItemList" Style="{StaticResource Items}"> <ListBox.ItemTemplate> <...

How to name a class generated by JIBX through codegen

I have an XML schema that has an element named Con, unfortunately con is an illegal file name on windows so when I use codegen to generated java classes it fails. What I'm trying to do is get JIBX's codegen to rename the class but it doesn't seem to work. This is JIBX 1.2.1 Example schema: <?xml version="1.0" encoding="UTF-8" ?> <xs:...

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 setData(String data); } public class AImpl implements A { B b; @Override public B getB...

JiBX "bind on load" and JUnit

Has anyone been successful in using JiBX "bind on load" mechanism while running a JUnit test case? What were the steps taken? How did you managed to use IDE test running integration with this solution? ...

Castor and sockets

I'm new to Castor and data binding in general. I'm working on an application that, in part, needs to take data off of a socket and unmarshall the data to make POJOs. Now, I've got the socket stuff down, and I've even generated and compiled java files thanks to Ant and Castor. Here's the problem: the data stream that I'll receive could b...

Bind ListBox to XmlDocument

Could someone help me out, to why my listbox is empty? The XmlDocument contains the following XML: <Config> <Tabs> <Tab Name="Test1" /> <Tab Name="Test2" /> </Tabs> </Config> In my XAML file I have tried the following <Window> <Grid> <ListBox DataContext="{Binding {StaticResource Data}, XPath=//Tabs}" ItemsSource=...

How to bind XML with namespace to WPF DataGrid ?

Hello again, I have a use-case where I need to bind data from an XML file to a WPF DataGrid. I prepared this example to demonstrate what I'll be doing in my final code. This is Books.xml: <?xml version="1.0" encoding="utf-8" ?> <library> <books> <book id="1" name="The First Book" author="First Author"> First Book Content ...

Choosing framework for XML persistency

I need to choose a framework for XML persistency of some java classes in our application. My requirements are: 1. I start from java classes, not from schema 2. Using annotations for customization 3. Ability to generate schema. Until now only JAXB seems to satosty all my requirements. XStream does not generate schema JiXB dows not use j...

calling plugin from java code

hi i am using eclipse as IDE for the development of my application. I have one doubt. I have one plugin that is capable to creating a class on from one xml file. Now, the problem is that i have many xml files and classses to generate.. can anyone please tell me how to invoke the plugin from my java test class, so that i can create clas...

How to bind xml to bean

In my application i use some API via HTTP and it returns responces as xml. I want automaticaly bind data from xml to beans. For example bind following xml: <xml> <userid>123456</userid> <uuid>123456</uuid> </xml> to this bean (maybe with help of annotations) class APIResponce implement Serializable{ private Integer userid; p...

Problem in generating complex types while using XML Data Binding

Hi, I am using XML Data Mapping and having a problem with generating complex types while using it. If i am having an XML like below its working fine <?xml version="1.0" standalone="yes" ?> <Sample> <connection> <item Name="ABC">123</item> <item Name="XYZ">123</item> <item Name="MNO">123</item> </...