Thanks everyone.
In most cases the XML will be generated outside of DBP; as you know its XML plugins only deal with files. In some cases the XML will arrive from over the internet; in other cases via local windows components.
The reason I want this feature is because the logic needs to be read back; serializable logic. I could generate LUA, but could not easily read it back to authorize or produce logic dynamically. XML is easy to read and write on either side of the database.
I briefly looked at your library Phaelax, it seems like the most complete solution available; I'll try it out; and will add memblock/bank functions as suggested by Kevin.
It's a question of finding out what boolean conditions are fastest. I know a fixed length Mid$ expression is quite fast compared to Fast Left$ etc, but the XML would need to be rigidly structured which would not very well formed and too memory intensive.