I need to write a logic in java that
What is the best way to achieve this.
Thanks !
您可以使用XMLUnit来满足大多数需求。
Writing an XML parser from scratch is a bad idea if that is what you mean. It sounds really easy at first, but then quickly becomes a nightmare, trust me. I highly recommend taking advantage of existing tools.
http://www.roseindia.net/opensource/xmldiff.php lists several tools, inlcuding 3DM, diffmk, diffxml, VMTools , X-Diff , and XMLUnit . If you do have to write your own parser, you might want to at least look at the code from these projects for ideas. However, it takes much less time and effort to just give them credit and use their tools than to rewrite them yourself. I haven't used any of these tools, so buyer beware.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.