Default xml document

Discussion in 'XML' started by un, Dec 9, 2004.

  1. un

    un Guest

    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
     
    un, Dec 9, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yburtin
    Replies:
    2
    Views:
    647
    yburtin
    Oct 26, 2004
  2. Tony Prichard
    Replies:
    0
    Views:
    787
    Tony Prichard
    Dec 12, 2003
  3. Manish Hatwalne
    Replies:
    1
    Views:
    421
    Martin Honnen
    Jul 13, 2004
  4. Replies:
    4
    Views:
    712
  5. icogs
    Replies:
    0
    Views:
    154
    icogs
    Jan 31, 2008
Loading...

Share This Page