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.
Showing posts with label SAX. Show all posts
Showing posts with label SAX. Show all posts
November 1, 2012
Applying a Namespace During JAXB Unmarshal
May 24, 2011
JAXB and DTD - Apache log4j Example
There is a common misconception that JAXB requires an XML Schema. This is understandable since JAXB offers the ability to derive Java classes from an XML schema, and generate XML schemas from annotated Java classes. In reality the JAXB annotations are used to map XML to objects, and although not part of the JAXB specification, the XJC tool offers the ability to generate Java classes from a DTD. In this post we will use JAXB to interact with XML that corresponds to the Apache log4j DTD.
March 11, 2011
Preventing Entity Expansion Attacks in JAXB
This post will cover how to protect yourself from the entity expansion attack when you are using JAXB.
Subscribe to:
Posts (Atom)