Generate XML

suggest/request new features

do you need XML generation?

no, thanks
1
14%
yes and I'm preferably using XML Schema
6
86%
yes and I'm preferably DTD
0
No votes
yes and I need to work WSDL-based
0
No votes
 
Total votes : 7

Generate XML

Postby Volker Bergmann » Mon Nov 12, 2007 4:15 pm

benerator can parse metada from XML Schema files and auto-generate data that conforms to them.
This support could be extended to DTDs, or WSDLs

XML Schema files can aditionally be annotated with benerator metadata, e.g.

Code: Select all
<xsd:attribute name="ranking"  type="xsd:string">
  <xsd:annotation>
    <xsd:appinfo>
      <ben:attribute values="A,B,C"/>
    </xsd:appinfo>
  </xsd:annotation>
</xsd:attribute>


So you could generate XML files without further configuration (in easy cases). benerator is able to import the metadata when running from setup file and restrict or override settings of the schema.
Volker 'databene' Bergmann

Need faster response times? phone support? onsite support? training? custom extensions? immediate bug fixes? Support Benerator evolution by buying services from Volker Bergmann!
User avatar
Volker Bergmann
 
Posts: 654
Joined: Sat Nov 10, 2007 2:40 pm

Re: Generate XML

Postby premvarathen » Wed Jul 22, 2009 2:26 pm

I tried to generate xml files based on xsd, I am getting the following error. This is the first time I am trying and If anyone has the exact step to generate the xml file please let me know.

C:\BENERA~1\DATABE~1.9-S\bin>createXML demo/shop/PMABDataInterchange.xsd PMABDat
aInterchange 834Inbound-{0}.xml 1
Local classpath: .;C:\Benerator\databene-benerator-0.5.9-SR1\bin;C:\Benerator\da
tabene-benerator-0.5.9-SR1\lib\*
18:53:53,077 DEBUG (main) [CONFIG] No custom converter setup 'converters.txt' fo
und; using defaults.
Exception in thread "main" org.databene.commons.ConfigurationError: Resource not
found: /demo/shop/PMABDataInterchange.xsd
at org.databene.commons.IOUtil.getResourceAsStream(IOUtil.java:501)
at org.databene.commons.IOUtil.getFileOrResourceAsStream(IOUtil.java:486
)
at org.databene.commons.IOUtil.getInputStreamForURI(IOUtil.java:227)
at org.databene.commons.IOUtil.getInputStreamForURI(IOUtil.java:198)
at org.databene.commons.xml.XMLUtil.parse(XMLUtil.java:206)
at org.databene.commons.xml.XMLUtil.parse(XMLUtil.java:200)
at org.databene.platform.xml.XMLSchemaDescriptorProvider.setSchemaUri(XM
LSchemaDescriptorProvider.java:121)
at org.databene.platform.xml.XMLSchemaDescriptorProvider.<init>(XMLSchem
aDescriptorProvider.java:113)
at org.databene.platform.xml.XMLSchemaDescriptorProvider.<init>(XMLSchem
aDescriptorProvider.java:103)
at org.databene.benerator.file.XMLFileGenerator.<init>(XMLFileGenerator.
java:81)
at org.databene.benerator.main.XmlCreator.createXMLFiles(XmlCreator.java
:71)
at org.databene.benerator.main.XmlCreator.main(XmlCreator.java:63)
premvarathen
 
Posts: 2
Joined: Fri Jul 17, 2009 8:16 am

Re: Generate XML

Postby Volker Bergmann » Wed Jul 22, 2009 2:40 pm

Hi,
obviously there is no file demo/shop/PMABDataInterchange.xsd. I assume the relative path demo/shop is wrong.
BTW: This forum is for feature requests. Questions for help belong into to 'help' forum.
Regards,
Volker 'databene' Bergmann

Need faster response times? phone support? onsite support? training? custom extensions? immediate bug fixes? Support Benerator evolution by buying services from Volker Bergmann!
User avatar
Volker Bergmann
 
Posts: 654
Joined: Sat Nov 10, 2007 2:40 pm


Return to Benerator Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron