Frage

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

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top