What's a good library or coding approach to create an XML-like file at run time
<p>I would like to write some sort of API such that I can call it and say hey add this thing as the subclass of that thing and the output File that it generates for me I would able to see something like this:</p>

<p><img src="http://i.stack.imgur.com/ZZacT.png" alt="enter image description here"></p>

<p>or tell it to declare these things as a class and the output look would look like this:</p>

<p><img src="http://i.stack.imgur.com/uUtkG.png" alt="enter image description here"></p>

<p>In here, just those Person and Student are the params that I will pass to the API. The rest of it are like keywords, will always be the same.</p>

<p>Basically something like this: <a href="http://www.w3.org/TR/owl-ref/#subClassOf-def" rel="nofollow">http://www.w3.org/TR/owl-ref/#subClassOf-def</a></p>

<p>So I am interested to know about your suggestions for what is good approcahc or Libaries, etc... that help me with this sort of file manipulation?</p>

<p>Thanks. </p>
