Generate XML from java Properties in a predefined XSD



I need to generate an XML file for some key value pairs. I know this is basic but i am looking for a simple way to do it. This is how i want my XML to be generated. I have Name value pairs as properties.



<ConfigInfo>
<Attribute>
<Name>Name1</Name>
<Value>Value1</Value>
</Attribute>
<Attribute>
<Name>Name2</Name>
<Value>Value2</Value>
</Attribute>
<Attribute>
<Name>Name3</Name>
<Value>Value3</Value>
</Attribute>
</ConfigInfo>


Is there a way to do this without using JAXB ?


No comments:

Post a Comment