[Home] [By Thread] [By Date] [Recent Entries]
I would prefer this to be really an xml/xslt problem and solution.
For this purpose, I'd rather have : <content name="subject"> Hello <BUYERS_NAME/></content> instead of: <content name="subject"> Hello [[BUYERS_NAME]]</content> and the same for any other replacement targets. Then I'd provide the replacement text simply in the template matching the target: <xsl:template match="BUYERS_NAME"> <xsl:value-of select="/*/BUYERS_NAME"> </xsl:template> Or I could make all replacements using a single template only: <content name="subject"> Hello <insert>BUYERS_NAME</insert></content> <xsl:template match="insert"> <xsl:value-of select="/*/*[name() = current()]"> </xsl:template>
On 9/25/06, Senthilkumaravelan Krishnanatham <senthil@xxxxxxxxx> wrote: Hi All, I need help in logic of replacing the string in XML for the below input. <test> <content_vars> <content name="subject"> Hello [[BUYERS_NAME]]</content> <content name="text"> REF Order [ORDER_NUMBER]</content> </content_vars> <BUYERS_NAME> SENTHIL </BUYERS_NAME> < ORDER_NUMBER > 1234 </ORDER_NUMBER >
|

Cart



