Results 1 to 9 of 9

Thread: Xml

  1. #1
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 02
    Posts
    333

    Xml

    I want to create a sample XML file from an XSD file...

    Any recommended freeware that could do this for me?

    (Want to create some test data)

    Have already tried using Eclipse and had some problems.... anything else?

    Cheers!

  2. #2
    Moderator
    Join Date
    Jan 05
    Location
    Sydney
    Posts
    13,615

    Re: Xml

    An XML schema file is an XML document. If you want to extract data from it use an XSL stylesheet. Modern browsers IE6+/Opera/Firefox all support XSL.

    XML forum

  3. #3
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 02
    Posts
    333

    Re: Xml

    mmm... ok

    What I want to do is automatically create an XML file that conforms to the XSD.

    Not sure if this analogy is useful, but if the XSD was a class then I would like to instansiate it.

    I know this is a little "backwards" since the XSD was designed to validate the XML, but we need some XML data for our testing.

    Hope this makes sense!

    Cheers!

  4. #4
    Moderator
    Join Date
    Jan 05
    Location
    Sydney
    Posts
    13,615

    Re: Xml

    Oh.

    Usually one creates the schema around the data

    If you make a program that creates random XML files that conform to your schema then there's not going to be much point in testing the schema file is there?

  5. #5
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 03
    Location
    Munich - Germany
    Posts
    476

    Re: Xml

    Quote Originally Posted by penagate
    ...
    Usually one creates the schema around the data ...
    Well sort of. Usually a Schema describes a standard two or more partys have committed on. Of course it is created around the data that should be exchanged, but usually the xsd is first! It describes how your XML File is supposed to be structured.

    I know that XMLSpy from Altova can do what you asked for, but I dont know if the Free Home Version supports it.
    http://www.altova.com/support_freexmlspyhome.asp

    Dont know of any other Freeware stuff doing it. Sorry!

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  6. #6
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 02
    Posts
    333

    Re: Xml

    Penagate & Sgt-Peppa,

    Thanks for replies.

    I have also tried XML Spy, but it is not creating the XML files properly... unfortunately, it does not create a complete structure.

    Am going to try and write something myself Shuold be something in the .NET framework I guess.

    Cheers guys!

  7. #7
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 03
    Location
    Munich - Germany
    Posts
    476

    Re: Xml

    It depends on the types of the nodes. If the nodes are optonal they usually dont get created. Have you tried to use the Validate Instance Functionality afterwards?
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  8. #8
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 02
    Posts
    333

    Re: Xml

    Hey Sgt-Peppa,

    Yeah, I tried to validate afterwards and the XML instance is not valid.... e.g. some of the data should only be 10 long, but XML-Spy just ignores this and puts in a long decimal number!

    I also selected for the instance to be generated with both mandatory and non-mandatory data, but it just ignores it.

    Not really doing its job.

    Cheers for tips though.

  9. #9
    Hyperactive Member
    Join Date
    May 99
    Location
    Sunny Southern Weather
    Posts
    406

    Re: Xml

    chuddy -

    I need to do the same thing - read an XSD and then create XML (nodes) based on the XSD, just like XML Spy.

    Did you ever solve this?

    Am I going to have to write my own XSD pareser?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •