Tag Archives: xml

Spring C-notation

In a previous post, I talked about¬†Spring P-notation. ¬†In this blog post, I will give an example of the Spring C-notation for constructor arguments. The C-notation namespace needs to be added to your configuration file. All that is left is … Continue reading

Posted in Java | Tagged , , , , , , , , , | Leave a comment

Spring P-notation

Spring P-notation was made to make creating spring config files a little neater and shorter. Here is what a typical file would look like. Here is what it looks like once the P-notation is used.

Posted in Spring | Tagged , , , , , , | 1 Comment

Adding an attribute to a wrapper in JAXB

I have a list in an object. I need to output this list in XML. Normally this would be accomplished by the following: This produces the following output This is great, until I have the need to add an attribute … Continue reading

Posted in Java, JAXB, json | Tagged , , , | 2 Comments

Marshalling an object without @XmlRootElement

You would normally marshall an object to it’s XML String form by something similar to: This assumes that the object is annotated with @XmlRootElement. If it is not, then you have to create a root element for it, by something … Continue reading

Posted in Java, xml | Tagged , , , | Leave a comment