[lxml-dev] instance from schema
jholg at gmx.de
jholg at gmx.de
Fri Aug 15 12:56:51 CEST 2008
Hi,
> I'm looking for a freely available tool that can generate xml instance
> documents from an xml schema. I'm aware of Sun's xmlgen, but I cannot
> find a valid web link to it. Does anyone have a current link to Sun's
> xmlgen or know of a similar tool?
>
If you mean random valid sample documents:
Seems like eclipse has tools for such tasks:
http://www.eclipse.org/webtools/community/tutorials/XMLWizards/XMLWizards.html
You can definitely do the like with oXygen xml editor, but this is not
free software;
although you can get a temporary evaluation licence.
generateDS lets you create data structures from a given schema which you
can
then populate and serialize:
http://www.rexx.com/~dkuhlman/generateDS.html
I don't know if this can be easily used to create valid random sample
data.
> When writing such a tool, wouldn't you need to load the schema as an xml
> document, walk the tree, and output appropriate instance xml (probably
> not trivial, given xml schema's complexity)?
I'd say so. An alternative might be to implement such functionality using
an
elaborate XSLT.
Regarding lxml, you could of course create an instance document through
the lxml API(s)
and then validate.
Holger
>
--
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20080815/88d877b8/attachment.htm
More information about the lxml-dev
mailing list