What is the best way to check if a string is valid XML for Jdom2?

有帮助吗?

解决方案

Put it in a try/catch block and parse it with JDOM 2..... then if you need to handle the JDOMException it is not valid.

rolfl

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top