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
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