function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kito kidkito kid 

can't get value of ELEMET on xml with DOM

Below is the xml.

 

<item>
<title>
<![CDATA[ TESTING ]]>
</title>
<guid isPermaLink="false">https://www.test.com</guid>
<link>https://www.test.com/16</link>
</item>

 

I am using the followin code, but I couldn't get value of title.

In this case, I want TESTING insides title.

 

if(node.getName() == 'Item'){
       String data = node.getChildElement('title', null).getText()

}

Best Answer chosen by Admin (Salesforce Developers)