tesmc
asked on
XSL: how to copy entire node but replace contents of one given element?
I want to copy over all instances of an xml input but replace the contents (by substring) of one of the elements <Iden> with digital value only.
will become
<Bill>
<FOP>
<Iden>R2</Iden>
<CreditCard>
<CCCode>DC</CCCode>
<CCNum>1212301</CCNum>
<CCExp>
<Month>2</Month>
<Year>12</Year>
</CCExp>
<Fname>JOHN</Fname>
<Lname>SMITH</Lname>
</CreditCard>
</FOP>
<Addr Use="T">
<Iden>R1</Iden>
<Street>720 W 10 ST</Street>
</Addr>
</Bill>
will become
<Bill>
<FOP>
<Iden>2</Iden>
<CreditCard>
<CCCode>DC</CCCode>
<CCNum>1212301</CCNum>
<CCExp>
<Month>2</Month>
<Year>12</Year>
</CCExp>
<Fname>JOHN</Fname>
<Lname>SMITH</Lname>
</CreditCard>
</FOP>
<Addr Use="T">
<Iden>1</Iden>
<Street>720 W 10 ST</Street>
</Addr>
</Bill>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No worries, glad to help! :)
ASKER