I am writing a simple CSV to XML processor in Java.
I am using JAXB to generate a model in java from a DTD. I need to process the CSV format into ... |
Castor framework (xml to java bean binder framework) provides functionality to map my existing java bean to xml. Can I achieve same thing using JAXB ?
|
We are using JAXB to map Java classes into XML files. Currently we use the Java-to-XSD approach by annotating the Java classes.
This works fine in general but we've hit the following ... |
I have an existing XML schema that contains a type that I would like to map to a Java Map of some sort using JAXB. My build process takes the schema ... |
Note: Editing this to rephrase it around JAXB in hopes of getting new answers. I'm using CXF, but it's using JAXB for the mappings.
I've got a POJO model. Right now I ... |
If I have Map setup like:
map.put("foo", "123");
map.put("bar", "456");
map.put("baz", "789");
then I want to do something like:
for (String key : map.keySet().toArray(new String[0])) {
// marshall out to .xml ...
|
In one of my projects I use JAXB2 marshaller, having a contract-first web service I generate the objects from a XML Schema.
Everything works just fine. But, I have a "code usability" ... |
|
I am trying to marshal/unmarshal a Map<String, Map<String, Serializable>> via JAXB. There are two problems:
1. JAXB cannot handle complex maps.
2. JAXB cannot handle interfaces (Serializable in this context).
How is one ... |
There is a placeholder answer over at the unofficial guide with a link to an article which (to me) seems quite unrelated.
I use XJC to generate my JAXB classes ... |
I have written a JAXB mapping that stored a sublist inside a root element in a LinkedHashMap<String, Object> instead of a Collection<Object> maintained through a specific XmlJavaTypeAdapter. Hereunder a sample:
@XmlRootElement
public class ... |
The question is about JAXB Map marshalling - there is plenty of examples on how to marhsall a Map into a structure like follows:
<map>
<entry>
<key> KEY ...
|
I'm trying to produce something like this with JAXB:
<person>
<firstName>Foo</firstName>
<lastName>Bar</lastName>
<identities>
<green id="greenId">
...
|
I am writing a library in which I need to take a type like xsd:string and find the relevant Java type according to:
http://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding#Default_data_type_bindings
I've tried to navigate through the JAXB/XJC ... |
When a class contains a java.util.Map, SchemaGen generates an xsd with a namespace on the Map elements. However when the marshaller generates xml from the same class no namespace is ... |
I'm currently using JAXB annotations, which work great for most cases. However, I've come across something I can't figure out how to process/create annotations for. I have the following ... |
I have a map of lists that I need to marshal. I created XML adapater but I keep getting java.util.List is an interface, and JAXB can't handle interfaces. when creating JAXB ... |
We are working with Jaxb to unmarshall a large deeply nested document. Xjc wouldn't work with the schema so we are having to map it by hand. Any suggestions for testing ... |
how can I map (via JAXB in java 1.6) Collection to XML and from XML, where
class mapping{
@XmlElementWrapper(name="list")
@XmlElement(name="item")
Collection<A> list;
}
abstract class ...
|
I have a class world that contains a map of humans. If I marshal the class world I get following output:
<world>
<humans>
...
|
I have
xml1:
<abc><name>hello</name></abc>
xml2
<xyz><name>hello</name></xyz>
I have one java class.
@XmlRootElement(name="abc") (this
public class Foo{
@XmlElement
String name;
}
I do not want another class, but would like to accomodate xml2 with ... |
I'm just changing design errors made in the past, but want to keep backwards compatibility of my software. For this I would need some way to map two flavors of an ... |
I'm trying to make JAXB to capture the tag's content into some property of Java Bean.
This is an example of XML message:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Film Id="5705" Title="Some title" TitleOrig="Original title">
...
|