Questions tagged [xml-binding]

XML data binding refers to a means of representing information in an XML document as an object in computer memory. This allows applications to access the data in the XML from the object rather than using the DOM or SAX to retrieve the data from a direct representation of the XML itself.

92 questions
1
vote
1 answer

XSD choice between sequence or single element

I'm trying to create a choice between a sequence of two elements, and one single element, as such:
Axel Jonsson
  • 37
  • 2
  • 7
1
vote
1 answer

Anybody is aware of a XML to SWI-Prolog binding tool similar to JAXB for Java or XSDE for C++?

Is it possible to create Prolog-specific bindings of XML schema files? If so, can anybody point me in the right direction? I have a schema which I use in Java to create a JAXB binding to serialize and de-serialize XML files. These files are…
Nikita Visnevski
  • 147
  • 2
  • 11
1
vote
1 answer

Compiling a valid XML Schema using CodeSynthesis XSD fails with Error MSB3721

I'm trying to use CodeSynthesis XSD (in Visual Studio 2015) for XML to C++ binding. I have a valid XML schema, but XSD fails to compile it. Here is the error message: Error MSB3721 The command "xsd.exe cxx-tree --output-dir "." --hxx-suffix ".hxx"…
Aciel
  • 95
  • 11
1
vote
1 answer

How to Mention XS:MaxLength in xml simpleType from Java XML Binding using annotations

I want to show the maxLength property in the below XML code. What i need to in my java class. JAVA Class need to modified occording the below xml: public class xxxx{ protected String…
Rajabaskar
  • 11
  • 2
1
vote
1 answer

Caution while extending a class which is Serializable

I have a class A implementing Serializable and another class B extends A, but I want to use class B for XML binding, not for serialization. Is there anything I should worry about?
saurabh
  • 257
  • 1
  • 3
  • 12
1
vote
0 answers

JAXB XML TO OBJECT (UNMARSHALING SOAP STYLE XML)

I need to unmarshall XML. XML is like this: nick 18 gogo 20 ok that's nice. now my java…
grep
  • 5,465
  • 12
  • 60
  • 112
1
vote
1 answer

Bind ListBox to XmlDocument

Could someone help me out, to why my listbox is empty? The XmlDocument contains the following XML: In my XAML file I have tried the following
Michal Ciechan
  • 13,492
  • 11
  • 76
  • 118
1
vote
0 answers

Getting exception Error while parsing XML in delphi

I am across a problem while parsing xml document. Actually I am using XMl Binding wizard to extract the attributes values but every time it throws exceptions. Here is my xml:
Rabi Jayasawal
  • 441
  • 1
  • 9
  • 18
1
vote
1 answer

Using Jackson XML binding to map lists to Pojo

I am using Jackson's XML binding to convert XML into a Java List, via an initial mapping to a Java POJO. What I have written works but I don't think I am using Jackson correctly. I am stuck with this ugly XML: One
John in MD
  • 2,141
  • 5
  • 25
  • 36
1
vote
1 answer

JAXB output issues: Strange exception

javax.xml.bind.MarshalException - with linked exception: [javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.] at…
1
vote
1 answer

get prefix / namespace bindings used in an XML document preferably using org.w3c.dom and javax.xml APIs

Is there a way to get the prefix / namespace bindings used in a XML document preferably using standard org.w3c.org and javax.xml APIs? I understand that prefixes may by re-defined in contained elements so the API should be able to account for that…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
1
vote
1 answer

How to XML Bind an Apache Cayenne generated class

First off, apologies for the long question. I have a number of classes generated by Cayenne such as follows. public abstract class _Form extends CayenneDataObject { public static final String NAME_PROPERTY = "name"; public static final…
Tom Hadkiss
  • 267
  • 1
  • 7
  • 16
1
vote
3 answers

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…
Dave
  • 4,050
  • 6
  • 30
  • 35
1
vote
2 answers

JAXBException : unexpected element (uri:"", local:"workConfigRestWrapper"). Expected elements are <{}Config>,<{}MyMap>

I need to unmarshall map using xml binding is giving error. MyMap.java: @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "MyMap") public class MyMap { @XmlElement(name = "Config", required = true) private final List config =…
beetri
  • 1,039
  • 11
  • 24
  • 40
1
vote
1 answer

XML tag repetition in JAXB marshalling using EclipseLink MOXy

Can someone help me to generate XML with repeated tag using JAXB marshalling using EclipseLink MOXy. @XmlPath("ExecRpt/Pty/@ID") --"ABC" @XmlPath("ExecRpt/Pty/@ID") --"ABD" @XmlPath("ExecRpt/Instrmt/@Exch") --"AAA" I am expecting result:
Sreeman
  • 111
  • 1
  • 1
  • 4