0

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

Mike Flynn
  • 22,342
  • 54
  • 182
  • 341

1 Answers1

1

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

rolfl
  • 17,539
  • 7
  • 42
  • 76