开发者

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 applicat开发者_JAVA技巧ion 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜