>Hi all,
>
>i have a text/xml document and with filetostr() i'm importing it into vfp. There is one problem : i'm my text file there are 'strange' characters like '&' and they need to stay like that. When i look into the imported string the '&' has changed into 'amp|,'
>
>Does somebody has a clue how to solve this problem ?
>
>thnx
Actually it's the other way around, your XML contains the strange characters which are converted by the program you use to watch the XML. You can use STRTRAN() to convert these "chain of characters" into real characters. This is a function to create these XML (and HTML) characters, you can simply reverse the expressions to get what you want.
Function txt2html
LPARAMETER lcHTML
lcHTML = STRTRAN(lcHTML,"<","<")
lcHTML = STRTRAN(lcHTML,">",">")
lcHTML = STRTRAN(lcHTML,["],""")
lcHTML = STRTRAN(lcHTML,[& ],"&")
RETURN lcHTML