Is't possible to reduce the text duplicate

Discussion in 'XML' started by Martin Andersson, Feb 2, 2005.

  1. Hello

    I have an xml structure (or planing to have) something that will have a
    structure like this.

    <event name="XXXX">
    <param name="a"\>
    <param name="b"\>
    <param name="xxxx"\>
    </event>
    <event name="YYYY">
    <param name="a"\>
    <param name="b"\>
    <param name="yyyy"\>
    </event>

    As can be seen the <param name="a"\> and <param name="b"\> are equal
    in both event. This duplication will then continue. So then I was
    thinking i could make an <head> element.

    <head>
    <param name="a"\>
    <param name="b"\>
    </head>

    And writing like this instead.
    <event name="XXXX">
    <something-that-put-the-element-from-head-here>
    <param name="xxxx"\>
    </event>
    <event name="YYYY">
    <something-that-put-the-element-from-head-here>
    <param name="yyyy"\>
    </event>


    Is there any mechanism in xml I can use to achieve this when declaring
    the xml file. That should remove loots of the text duplication, and also
    when I add something in the <head> that will be seen in all <event>


    /Martin
     
    Martin Andersson, Feb 2, 2005
    #1
    1. Advertisements

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

    reduce the CLB

    DAvid, Oct 24, 2004, in forum: VHDL
    Replies:
    2
    Views:
    728
  2. Jack Wright

    Reduce The Size Of Your ASP.NET Output

    Jack Wright, Feb 29, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    535
    Eric Lawrence [MSFT]
    Mar 2, 2004
  3. wooks
    Replies:
    3
    Views:
    701
    wooks
    Jul 22, 2004
  4. J Kenneth King
    Replies:
    3
    Views:
    505
    Diez B. Roggisch
    Feb 22, 2009
  5. Cameron Simpson
    Replies:
    1
    Views:
    481
    J Kenneth King
    Feb 19, 2009
  6. leo
    Replies:
    1
    Views:
    476
    Bob Lehmann
    Dec 5, 2005
  7. Voetleuce en fĂȘnsievry

    How to remove duplicate words from text

    Voetleuce en fĂȘnsievry, Jul 22, 2003, in forum: Javascript
    Replies:
    7
    Views:
    622
    Richard Cornford
    Aug 2, 2003
  8. Jim Carter
    Replies:
    6
    Views:
    222
    Matt Garrish
    Jan 12, 2004
Loading...