Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popualting Schema to generate random XML 1

Status
Not open for further replies.

brianon

Programmer
Feb 6, 2002
22
0
0
IE
Hi,

I have an XML Schema. I can create a XML doc using this schema.

What I need to do is figure out a way to populate my XML doc with random values. Is there any way to do this other than to write some process (C++ or Java) to parse the schema and generate an XML doc based on the schema.

I need to create a huge XML doc, so basically I'm wondering if there is an easier way to write my own code in (C++/Java) to do this ?

Regards,
Brian.

 
You'll need to write code. Sorry.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
XMLSpy has a function already written that will do this.

Jon

"Asteroids do not concern me, Admiral. I want that ship, not excuses.
 
JontyMC,

I downloaded XMLSpy yesterday so am very new to it.
Could you give me some pointers as to how to go about this ?
Help would be much appreciated.

Brian.

 
Its pretty easy, just load up your xsd file then go to DTD/Schema > Generate sample XML file. It gives you some options about non-mandatory elements, etc. It populates the file with generic values. You could write a small prog to make these random values if you need that. Would be easier than creating the whole XML file.

Jon

"Asteroids do not concern me, Admiral. I want that ship, not excuses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top