Default xml document

U

un

Hello all,

This may be a trivial question but..
Does anyone know the best way to implement defaults in xml?

Problem: I have an xml-document (which is used as input to a simulation
application) containing default values (both in attributes and
elements). Now I want to make it possible for a user to "override" one
or more of these values in a separate document, while the default values
are manitained for all others.

How is this best accomplished? I have defined a schema for the structure
of the document, and I am reading the document using DOM in Java (JAXP).

The only solution I can come up with is to read both documents (the
default and the user-defined) and compare them in the (Java) code? Is
this the best (only?) way to do it, or is there a simpler way that I
have missed?

Grateful for any comments.
/ulf

PS. Please e-mail
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top