<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><style>p {margin:0px;padding:0px;} blockquote { border: 0px; margin-top: 0px; margin-bottom: 0px; }</style></head><body style="">
<p><font color="#000000" face="Verdana" size="2">Hi,</font></p><p> </p><font color="#000000" face="Verdana" size="2"><blockquote type="cite">I'm looking for a freely available tool that can generate xml instance <br>documents from an xml schema. I'm aware of Sun's xmlgen, but I cannot <br>find a valid web link to it. Does anyone have a current link to Sun's <br>xmlgen or know of a similar tool?</blockquote><blockquote type="cite"> </blockquote><p> </p><p>If you mean random valid sample documents:</p><p> </p><p>Seems like eclipse has tools for such tasks: </p><p>http://www.eclipse.org/webtools/community/tutorials/XMLWizards/XMLWizards.html</p><p> </p><p>You can definitely do the like with oXygen xml editor, but this is not free software;</p><p>although you can get a temporary evaluation licence.</p><p> </p><p>generateDS lets you create data structures from a given schema which you can</p><p>then populate and serialize:</p><p> </p><p>http://www.rexx.com/~dkuhlman/generateDS.html</p><p> </p><p>I don't know if this can be easily used to create valid random sample data.</p><p> </p><blockquote type="cite">When writing such a tool, wouldn't you need to load the schema as an xml <br>document, walk the tree, and output appropriate instance xml (probably <br>not trivial, given xml schema's complexity)?</blockquote></font><p> </p><p><font color="#000000" face="Verdana" size="2">I'd say so. An alternative might be to implement such functionality using an </font></p><p><font color="#000000" face="Verdana" size="2">elaborate XSLT.</font></p><p> </p><p>Regarding lxml, you could of course create an instance document through the lxml API(s)</p><p>and then validate.</p><p> </p><p>Holger </p><p></p><font></font><blockquote></blockquote><div class="signature"><br /><br /><br />-- <br />Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?<br />Der Eine für Alle: http://www.gmx.net/de/go/messenger03</div></body></html>