xsl-list
[Top] [All Lists]

[xsl] Dumb Question - XML to XML changing only a few values

2007-11-30 15:15:51
Hi All

I've used XSL a lot, but always to transform XML to HTML, so I've known about 
and processed every XML element I output in the XML.

I'm sure what I want to do is really easy, but I've no idea how to do it

I now need to transform XML to XML, but change the contents of only one or two 
elements. The source XML is very large and, with the exception of the elements 
I need to replace, I won't know the remainder of the contents.

Is there a way to say "just copy everything to the destination XML, but any 
instance of <a></a> will have its contents replaced"?

For example

Source XML

<a>A</a>
<b>B</b>
<c>C</c>
<d>D</d>
<e>E</e>
<f>F</f>
<g>G</g>

So I just want to say replace contents of <a></a> with 12345 and just copy 
everything else

Destination XML

<a>12345</a>
<b>B</b>
<c>C</c>
<d>D</d>
<e>E</e>
<f>F</f>
<g>G</g>

Thanks in advance

Mark

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>