i creating xml file using tcl script, , replacing special character html entity. example in tcl script
input: set sample ¨“‚<–" //code create xml file
output: sample=& uml;& ldquo;& sbquo;& lsaquo;& ndash;
tcl script produces xml file below after using string map function replacing code replacing special character:
proc replace {content} { return[string map [list ¨ "& uml;" “ "& ldquo;" ‚ "& sbquo;" < "& lsaquo;" – "& ndash;"] }
output:
& uml;& ldquo;& sbquo;& lsaquo;& ndash;
tcl script replacing special character html entity.but problem when trying open xml file in browser getting xml parser error @ replaced html entity position. please suggest solution.
Comments
Post a Comment