0

I have question how can I get cdata from xml? So my xml looks like this:

<tag><![CDATA[Text]]></tag>

I tried to get word by getText(), getStringValue() but they return me empty string ;/ Any idea what should i do?

Mariola
  • 249
  • 7
  • 16

1 Answers1

0

Hardly rocket science:

    System.out.println(DocumentHelper
            .parseText("<tag><![CDATA[Text]]></tag>").getRootElement()
            .getText());
forty-two
  • 12,204
  • 2
  • 26
  • 36