Is it ironic that it can be difficult to map the java.util.Map class in JAXB (JSR-222)? In this post I will cover some items that will make it much easier.
Showing posts with label Namespaces. Show all posts
Showing posts with label Namespaces. Show all posts
March 6, 2013
JAXB and java.util.Map
November 1, 2012
Applying a Namespace During JAXB Unmarshal
For some an XML schema is a strict set of rules for how the XML document must be structured. But for others it is a general guideline to indicate what the XML should look like. This means that sometimes people want to accept input that doesn't conform to the XML schema for some reason. In this example I will demonstrate how this can be done by leveraging a SAX XMLFilter.
November 30, 2011
JAXB and Namespace Prefixes
In a previous post I covered how to use namespace qualification with JAXB. In this post I will cover how to control the prefixes that are used. This is not covered in the JAXB (JSR-222) specification but I will demonstrate the extensions available in both the reference and EclipseLink MOXy implementations for handling this use case.
Labels:
EclipseLink,
Extension,
JAXB,
MOXy,
Namespaces,
XmlNs,
XmlSchema
April 15, 2011
JAXB and JSON via Jettison - Namespace Example
In a previous post I described how Jettison can be leveraged by a JAXB implementation to produce/consume JSON. A reader correctly pointed out that I did not describe how to handle namespaces. Since JSON does not support namespaces you would not normally include them in your mappings. However if you wanted to map your object model to both JSON and XML with namespaces, this post will demonstrate how it can be done.
August 11, 2010
JAXB & Namespaces
The majority of XML documents are namespace qualified, yet most XML binding examples do not demonstrate namespaces (sometimes because the XML binding solution does not support them). In this post I'll demonstrate how easy namespace handling is using JAXB.
Labels:
JAXB,
Namespaces,
XmlElement,
XmlSchema,
XmlType
Subscribe to:
Posts (Atom)