new xml from tsd

I have several xml files stored in a collection and i need to create a new xml like these stored
with all blank element, is possible to create this from the tsd (or copying an xml…)?


There are lots of possibilities here and I’m not sure exactly what you want.

You can create a complete application to maintain a document type in Tamino using X-Application (download it here). This will allow you to create new instances, modify and delete them and so on. The X-Application is generated from the schema.

You can save an existing instance using Tamino X-Plorer, then edit it, copy it etc… and finally store it using X-Plorer or the Interactive Interface.

You could write your own program to create empty instances, or you could use a tool like XMLSpy.

If none of this helps, please give us a little more detail of your requirement.


My question isn’t clear, i think.
What i would like to do is create a new xml based on tsd schema stored in tamino.
In my project when a new user use my system i have the need to create a new instance for this new user.In Tamino i have stored the schema and the xml files of other users.So when a new user log into the system i need to create a new xml for this new user.
The solution i have implemented is to store in tamino an empty xml file and then i modify it and then istore it.Is there a more “smart” solution?

THx @nto

hi @nto,

if you are in an OO programming language, why not create an object that represents the xml instance, in you example the user.
when createing a new user, fill the properties of that java object.
then, simply generate a toXML method for that object, that complies to the rules of your schema.

if i remember correctly, there are even tools that will look at a schema and create java classes that represent thes objects for you.

hope that helps.

andreas f.

But is it possible to create an xml from tsd via java code with some api, or the only solution to do this is the afroe’s solution?


Hi there,

I am guessing what you are looking for is a solution that will take a tsd file (which is a subset of xml schema) and create Java classes that will be able to create appropiate XML that matches the schema? If this is so maybe check Castor project.

Regards, Stuart

Stuart Fyffe-Collins
Software AG (UK) Ltd.

I try to give you an example.
I have an element root with inside a sequence of elements A consisting of two subelement B (with attribute name) and the subelement C (with attribute id).
Now, i want to add a new element A to the sequence. My method (using JDOM) creates the element A with 2 subelements each with its attribute (name and id). So my code is very related to the schema used. If one day i’ll decide to change the xsd i have to change also my code!!I’m trying to do this for more portability and for first of all for flexibility.


Isn’t Castor only able to build classes from XML Schema (W3C XML Schema) and not from a Tamino schema?
Any suggestions?


Sorry I’ve no experience of Castor, but Tamino v3 schemas are actually W3C XSD schemas and use the xs:appinfo element for its own purposes (like defining doctype, collection, indices etc).

Stuart Fyffe-Collins
Software AG (UK) Ltd.