Re: [xml] xml find and replace

On Thu, Jul 19, 2012 at 9:42 AM, stuart shepherd
<jonny wark googlemail com> wrote:
I'm guesing it's something to do with having elements within the text, but
it doesn't look to be replacing anything but rather adding in the replace
value multiple times, is there a way round this.

It's replacing every text node in enum with the replace value, to
replace all enum's children instead:

  <xsl:template match='//control[name="MatGrp1Ch1Pend"]/enum'>
    <xsl:copy> <!-- copy the enum node-->
      <!-- use the following as contents -->
      <enumitem><value>16</value><label>Grp1 Ch1</label></enumitem>
      <enumitem><value>17</value><label>Grp1 Ch2</label></enumitem>
      <!-- etc ... -->

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]