search word in xml file in java?

2010-05-05 7:44 pm
Anyone got idea how to search a specific word in a xml file by using java?

回答 (2)

2010-05-06 6:23 pm
✔ 最佳答案
If you just want to find a specific word - you should be able to search for it without considering the file as anything other than a text document.
If you need to know where it is in XML hierarchy terms then you'll need to learn how to use something like DOM ( http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html gives you code to load a file ). You could either walk through the hierarchy testing the content of each node or you might be able to use XPath if what you want fits the criteria.
2016-02-28 11:06 am
So many methods. You can use adobe acrobat, ABBY fine reader, Nitro pdf professional. most easy solution of that ms word 2013 has inbuilt method of opening pdf in word format. One more easy solution create a google account where you can upload your file then whenever you go to download the file you can convert it into MS word or web page.


收錄日期: 2021-05-01 09:36:10
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20100505114408AAoIT9o

檢視 Wayback Machine 備份