Created
September 12, 2012 16:35
-
-
Save abhinavsingh/3707942 to your computer and use it in GitHub Desktop.
JAXLXml Constructor Examples showing sanitization of attributes and text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./jaxlctl shell | |
jaxl 1> $xml_obj = new JAXLXml('msg', array(), '<a href=""></a>'); | |
jaxl 2> echo $xml_obj->to_string(); | |
<msg><a href=""></a></msg> | |
jaxl 3> | |
jaxl 3> $xml_obj = new JAXLXml('msg', array('a'=>'some < tag data >'), '<a href="javascript:void(0);"></a>'); | |
jaxl 4> echo $xml_obj->to_string(); | |
<msg a="some < tag data >"><a href="javascript:void(0);"></a></msg> | |
jaxl 5> | |
jaxl 5> quit | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment