xml special character
i have xml formated document external apps cannot change looking this:
<?xml version="1.0" encoding="utf-8" ?>
<row>
<charge>3</charge>
<duration>5</duration>
<fdomain>1</fdomain>
<from>"allibaba"<sip:18002633394@sip.host.ca>;tag=169e3f2c</from>
<fuser><fuser />
<start>1167420888.001000</start>
<tdomain>1</tdomain>
<to>"john blaire" <sip:4162595623@localhost></to>
<tuser>80</tuser>
</row>
reading , outputing xml giving me :
3
5
1
"allibaba";tag=169e3f2c
1167420888.001000
1
"john blaire"
80
wen get:
3
5
1
"allibaba" 18002633394
1167420888.001000
1
"john blaire" 4162595623
80
the parsing removing <> in 2 case need extract number followed <sip: , before @ , remove rest
is possible , how?
<?xml version="1.0" encoding="utf-8" ?>
<row>
<charge>3</charge>
<duration>5</duration>
<fdomain>1</fdomain>
<from>"allibaba"<sip:18002633394@sip.host.ca>;tag=169e3f2c</from>
<fuser><fuser />
<start>1167420888.001000</start>
<tdomain>1</tdomain>
<to>"john blaire" <sip:4162595623@localhost></to>
<tuser>80</tuser>
</row>
reading , outputing xml giving me :
3
5
1
"allibaba";tag=169e3f2c
1167420888.001000
1
"john blaire"
80
wen get:
3
5
1
"allibaba" 18002633394
1167420888.001000
1
"john blaire" 4162595623
80
the parsing removing <> in 2 case need extract number followed <sip: , before @ , remove rest
is possible , how?
before process xml, strip
<cfset regxml = "\<sip\:[0-9]*\@sip\.\host\.ca\>\;tag\=[a-za-z0-9]*">
<cfset newxml = rereplacenocase(myxml,regxml,"","all")>
<cfset regxml = "\<sip\:[0-9]*\@sip\.\host\.ca\>\;tag\=[a-za-z0-9]*">
<cfset newxml = rereplacenocase(myxml,regxml,"","all")>
More discussions in Advanced Techniques
adobe
Comments
Post a Comment