当前位置: 动力学知识库 > 问答 > 编程问答 >

SQL / XML Issues in c# app

问题描述:

I am trying to move sql functionality from my app to xml, so the search string which was previously hardcoded is now in my xml

If I had a search string along the lines of

"select a from b where b.value = '" getValue() "'";

(probably not fully correct but hopefully you get the jist)

If i move that to the xml, when I read it back in, it obviously doesn't recognise the method call as its caught up as a string. How can I modify the value from the xml so when its read in my application it still treats it as before? I tried escaping the double quotes with \" but to no avail.

Thanks

网友答案:

You could use a placeholder in your XML file for the method you need to call (e.g. "[CALL: getValue]") and when you read it back into your application you can look for this placeholder and make the appropriate method call.

分享给朋友:
您可能感兴趣的文章:
随机阅读: