Is't possible to reduce the text duplicate

  • Thread starter Martin Andersson
  • Start date
M

Martin Andersson

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
 

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

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top