Using tohtml to translate &
flowersoft at compuserve.com
flowersoft at compuserve.com
Sat Jun 25 12:20:36 PDT 2011
The code I posted before needed some changes. It should work now.
If:
Then: fd=""{yourxmldata
LOOP1 If: fd co "&"
Then: ca=instr(fd,"&");
fd=mid(fd,"1",ca-"1")<"&"<mid(fd,(ca+"5"),"999"); goto LOOP1
LOOP2 If: fd co "'"
Then: ca=instr(fd,"'");
fd=mid(fd,"1",ca-"1"){"'"{mid(fd,(ca+"6"),"999"); goto LOOP2
LOOP3 If: fd co """
Then: ca=instr(fd,""");
fd=mid(fd,"1",ca-"1")&"\""&mid(fd,(ca+"6"),"999"); goto LOOP3
-----Original Message-----
From: filepro-list-bounces+flowersoft=compuserve.com at lists.celestial.com
[mailto:filepro-list-bounces+flowersoft=compuserve.com at lists.celestial.com]
On Behalf Of Mike Schwartz
Sent: Friday, June 24, 2011 5:09 PM
To: 'filePro'
Subject: RE: Using tohtml to translate &
> > I have to read some incoming XML files that are encoded with &,
> >>, etcetera. filePro 5.0.14 doesn't have a "FROMHTML()" function
> available.
Ok, I *ALMOST* have the following edit working to un-unicode a field.
I just have a problem with how to quote the < and > character:
ununi °{ {!" "!} @ | !&!<&> | !<!<"<"> | !>!<"<"> | *}
This string works OK for 1 or more "&" strings. It removes the
"&", replaces it with an "&" and closes up the extra spaces.
However, with a "test < test" string, it gives leaves me with a
string looking like "test < test" and with "test > test" it gives me a
syntax error.
The following string seems to work:
ununi °{ {!" "!} @ | !&!<&> | !<!<z> | !>!<q> | *}
any suggestions?
Thanks!
Mike Schwartz
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list