把asp 一段语句翻译成delphi,谢谢

function aaa(sstr) '转换成字节数组
Set xmldoc = CreateObject("Msxml2.DOMDocument")
Set node = xmldoc.CreateElement("binary")
node.DataType = "bin.hex"
node.Text = sstr
bytes = node.NodeTypedValue
aaa=bytes
end function
请那位大侠帮我转换为 delphi 感激不尽!

http://www.cnblogs.com/lcw/p/3352864.html
参考其中 string转为字节数组

http://blog.sina.com.cn/s/blog_985be1f6010124wp.html

如果输出的是16进制的字符串,比如00aa1f2d... 这样的,看这个