Say I have a simple XML file including this:
Code:
<ProductInfo>The <item>shirt</item> comes in 3 sizes.</ProductInfo>
<Comments>One <item>shirt</item> costs £10</Comments>
I need the XML file to know that the two instances of "shirt" are the same, so something like this:
Code:
<ProductInfo>The <item id="S3"/> comes in 3 sizes.</ProductInfo>
<Comments>One <item id="S3"/> costs £10</Comments>
<item id="S3" name="shirt"/>
...something to that effect, but obviously I'm doing it the wrong way.

What I want to achieve is a document that will look like this:

The shirt comes in 3 sizes.
One shirt costs £10

...so if I change "shirt" to "t-shirt" it will change in both places.

I'm finding it quite difficult to explain, but I hope you understand and can help me.

Thanks.