How do I create an XML document...

Discussion in 'XML' started by WideBoy, Dec 6, 2005.

  1. WideBoy

    WideBoy Guest


    I have access to a large xml schema namespace which has complicated
    references, structures, etc for all sorts of things. Amongst which are
    personDetails, and their UK postal address. What I would like to do is
    see what sort of instance document I need to create to test it's
    validity against this complex schema. The xml schema does not have a
    root node/element, perhaps this is because it is purely a namespace? -
    I don't know.

    My question is what is the easiest way of generating a simple XML
    document with just these two areas (personDetails and UKAddress) from
    such a huge namespace/schema beast?

    I have access to Altova's XMLSpy - which I use to manage this namespace
    and associated xml schemas. I just figure out how to create a test
    with some dummy data which would validate against this huge beast (when
    printed the schema spans more than 300 pages A4).

    Any comments, ideas, would be very welcome.
    WideBoy, Dec 6, 2005
    1. Advertisements

  2. Hi WideBoy,

    Try loading your Schema in the Stylus Studio XML Schema Editor:

    To generate an XML document for just the personDetails and UKAddress
    complexTypes, just select the node, right click one of them, and select
    View XML Sample and save it. This is explained in detail here:

    I think that one of the differences between spy's xml schema instance
    document generator is that it needs a document node (i.e. what you are
    calling the "root node") to work. By contrast, the stylus studio xml
    instance document generator works on any element / complexType. (I
    think this is probably why it's not working for you right now).

    The Stylus Studio Team
    Stylus Studio, Dec 6, 2005
    1. Advertisements

  3. WideBoy

    WideBoy Guest

    Thanks for your reply, I shall certainly check out stylusstudio.
    However, I have a gut feeling that there might be a XSL-type solution
    to this problem.

    If some one can recommend something along these lines and give me a bit
    of a leg up with the XSL, I'm sure I would be in a position to take it
    on and develop it as a full blown solution. In the first instance I'm
    just looking for something that gives me the basic document structure
    so that I can manually fill in the data. Ideally, what I would like is
    something like StylusStudio I guess especially if this also provides
    some random valid data for each element of the document.


    Naran (aka Wideboy)
    WideBoy, Dec 6, 2005
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Prichard
    Tony Prichard
    Dec 12, 2003
  2. Manish Hatwalne
    Martin Honnen
    Jul 13, 2004
  3. Replies:
  4. Krithika San
    Marnen Laibow-Koser
    Nov 14, 2009
  5. icogs
    Jan 31, 2008

Share This Page