[Home] [By Thread] [By Date] [Recent Entries]
Hi all,
I have a string element in a xml file, it can consist a word. After parsing I am taking letter by letter with some formatting stuff. Ex. My original String: <Value>H A N</Value> After Parsing : (I have trimmed output for more clearance) <Body> <FontFace value="STDFONT.FNT"><FontSize value="0.2">H</FontSize></FontFace> <FontFace value="STDFONT.FNT"><FontSize value="0.2"></FontSize></FontFace> <FontFace value="STDFONT.FNT"><FontSize value="0.2">A</FontSize></FontFace> <FontFace value="STDFONT.FNT"><FontSize value="0.2"></FontSize></FontFace> <FontFace value="STDFONT.FNT"><FontSize value="0.2">N</FontSize></FontFace> </Body> As you see I have spaces on my original string. I want to translate spaces into '_x0020_' rather than empty space. I tried using "translate()" but it will put one character because I have single space. translate(substring($text,$i,1), ' ', '_x0020_') The out put I want to get is... .... <FontFace value="STDFONT.FNT"><FontSize value="0.2">_x0020_</FontSize></FontFace> .... Please help me.... - Regards - Buddhi from Sri Lanka -
|

Cart



