I have an xml file like this, which stores video subtitles:
<videos>
<video>
<id>1</id>
<enSub>Hello Foo! Good morning!</enSub>
<cnSub>你好 Foo! 早上好!</cnSub>
</video>
<video>
<id>2</id>
<enSub>Hello Bar! Good afternoon!</enSub>
<cnSub>你好 Bar! 下午好!</cnSub>
</video>
</videos>
I want to search certain keywords through this xml, like I enter "hello moning" in the search text area, and the search result could find the video element with id "1".
I guess that using php xpath can only find single keyword in the xml file, and it has to iterate through the whole tree. I'm not confident that I can write a function with good performance.
I tried to use external resource like google custom search to search my web, but it turned out that I'm not using pages to display each video. I pass different video id as parameter to the video-play-page.
I also thought of regular expression, but don't know how to handle the orders of keywords.
So is there any search engine that I can use to search multiple keywords to pinpoint a video. I designed this to help my users to quickly find the video the watched.
I googled a lot. It's really slow, sometimes I just can't access google, in my place in China here. I tried "multiple keywords search xml" as searching keywords. Maybe my English isn't intelligent enough for google to understand my intent. I hope you guys here understand my question.
Thank you so much!!