Here are some functions I use to accept unicode chars:
(Thought it would be greedy to keep it to myself)
Code:
#Definefunction addNode(parent,name,value)
if ChrUnicodeToString(value)!=value then value=ChrUnicodeToHex(value)
if value == "" then newnode=DOMCreateElement(name)
else newnode=DOMCreateElement(name,value)
DOMAppendChild(parent,newnode)
return newnode
#Endfunction
#Definefunction hex2Uni(value)
return ChrHexToUnicode(value)
#Endfunction
#Definefunction setUniAttr(node,attr,value)
if ChrUnicodeToString(value)!=value || StrClean(value,'"',"",@FALSE,2)!="" then value=ChrUnicodeToHex(value)
DOMSetAttr(node,attr,value)
return
#Endfunction
#Definefunction getUniAttr(node,attr)
value=DOMGetAttr(node,attr)
if StrTypeInfo(StrTypeInfo(value,0),-1)=="HexDg" && StrCmp(value,strupper(value))==0 && strlen(value)>3 then value=hex2Uni(value)
return value
#Endfunction
#Definefunction setUniInnerText(node,value,def)
if ChrUnicodeToString(value)!=value || StrClean(value,'</>',"",@FALSE,2)!="" then value=ChrUnicodeToHex(value)
DOMSetInnerHTML(node,value,def)
return
#Endfunction
#Definefunction getUniInnerText(node)
value=DOMGetInnerText(node)
if StrTypeInfo(StrTypeInfo(value,0),-1)=="HexDg" && StrCmp(value,strupper(value))==0 && strlen(value)>3 then value=hex2Uni(value)
return value
#Endfunction
#Definefunction getElementByAttrValue(parentnode,nodename,attrname,value)
nodelist=DOMChildElementItemize(parentnode,nodename)
for i=1 to itemcount(nodelist,@TAB)
curitem=itemextract(i,nodelist,@TAB)
if strlower(getUniAttr(curitem,attrname))==strlower(value) then return curitem
next
return @FALSE
#Endfunction
have fun,
-Trent