470,810 Members | 1,264 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

How do I create an XML document...


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.

Dec 6 '05 #1
2 1243
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

Dec 6 '05 #2
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)

Dec 6 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by obsidian8 | last post: by
3 posts views Thread by takarimasu | last post: by
3 posts views Thread by sloesch | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.