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. 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. wooks
    Replies:
    3
    Views:
    548
    wooks
    Jul 22, 2004
  2. J Kenneth King
    Replies:
    3
    Views:
    373
    Diez B. Roggisch
    Feb 22, 2009
  3. Cameron Simpson
    Replies:
    1
    Views:
    364
    J Kenneth King
    Feb 19, 2009
  4. Voetleuce en fĂȘnsievry

    How to remove duplicate words from text

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

Share This Page