开发者

How do I search nodes of XML document for text? Or convert to SQL tables?

I have an XML file and would like to run a search on the nodes for text that matches user input. My options are:

  1. Convert the XML file to a SQL table and run the search against the table r开发者_如何学运维ecords.

  2. Search the XML nodes themselves.

The problem is that I cannot find a open source conversion utility, nor can I figure out how to search the XML nodes.

I can use PHP, Ruby, or Python for the search code.

Any pointers on how can I do 1 or 2?

Thanks


For #2, define an XPath expression that corresponds to the search to perform, then use one of the many XML bindings to to apply it to the XML document.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜