Sorry this is a little long. I needed to explain myself....
I need to manipulate an XML document which follows a schema. But I don't know of the schema beforehand. So there are no Java classes for types defined in the schema and I don't want to generate these runtime if I don't have to. Our goal is to support a dynamic GUI based on whatever schema and manipulate the XML document based on user input from the GUI. As a result I have to add/remove XML fragments (corresponding to types/properties in the schema). Removing is easy. Just position the XmlCursor at the right place and remove. What is the best way to add XmlObjects corresponding to types/properties? Say an object O (of some type) has an optional property of type 'T'. If I have to add the XmlObject corresponding to this property, what steps should I take? Should I create a new instance of type 'T' using schemaTypeLoader? How do I insert this instance at the right place in the original document? I think what I am looking for is something like this setPropertyValue (XmlObject parentObject, SchemaProperty prop, XmlObject propValue) where prop is a property of parentObject's SchemaType and we need to set its value to propValue. Thanks. -Ajay

