in reply to parsing reserved chars with xml::simple
idea: split the incoming xml at the >DATA TO BE CONVERTED or WHITESPACE< and just call the convertchar method on the data between the ><$incoming_xml = ' <?xml version="1.0" encoding="UTF-8"?> <TRANSACTION> <FIELDS> <FIELD KEY="user">name</FIELD> <FIELD KEY="password">pass&word</FIELD> <FIELD KEY="operation_type"><do_what></FIELD> </FIELDS> </TRANSACTION>';
once converted i will send it through XMLin then i can loop through the resulting hash and convert the !# back to their original values therefore preserving the necessary bad values.$converted_xml = ' <?xml version="1.0" encoding="UTF-8"?> <TRANSACTION> <FIELDS> <FIELD KEY="user">name</FIELD> <FIELD KEY="password">pass!38word</FIELD> <FIELD KEY="operation_type">!40do_what!41</FIELD> </FIELDS> </TRANSACTION>';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: parsing reserved chars with xml::simple
by diotalevi (Canon) on Feb 17, 2004 at 19:12 UTC | |
by bear0053 (Hermit) on Feb 17, 2004 at 19:28 UTC | |
by diotalevi (Canon) on Feb 17, 2004 at 19:46 UTC | |
by iburrell (Chaplain) on Feb 17, 2004 at 21:25 UTC | |
|
Re: Re: parsing reserved chars with xml::simple
by iburrell (Chaplain) on Feb 17, 2004 at 21:20 UTC |