Iczer Posted March 15, 2014 Posted March 15, 2014 Well, i need decode predefined entities in XML/HTML to their original form - is there are some easy way to do it according all rules? Maybe in java or vb scipt - something like unescape() function... http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML basically i need to convert "&" to "&" and so on
Danp2 Posted March 15, 2014 Posted March 15, 2014 Have you looked at >this thread? Latest Webdriver UDF Release Webdriver Wiki FAQs
Iczer Posted March 15, 2014 Author Posted March 15, 2014 yeah, but i already have something like this Local $PredefinedEntitiesInXML[5][2] = [[""",'"'],["&","&"],["'","'"],["<","<"],[">",">"]] For $k = 0 To UBound($PredefinedEntitiesInXML,1) - 1 $sSting = StringRegExpReplace($sSting,$PredefinedEntitiesInXML[$k][0],$PredefinedEntitiesInXML[$k][1]) Next what i wanted is $code = "Function func_unescape(x)" & @CRLF $code &= "func_unescape=unescape(x)" & @CRLF $code &= "end Function" $vbs = ObjCreate("ScriptControl") $vbs.language="vbscript" $vbs.addcode($code) $sString = $vbs.run("func_unescape",$sString) mLipok 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now