I have XML
<?xml version="1.0"?>
<xmldata
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" status="SUCCESS">' +
<recordset name="colr" rewr="1" rr="w">
<field name="current-color" rr="HH">**target value**</field>
<field name="current-color2" rr="HH">**target value2**</field>
</record>
</recordset>
</xmldata>
I am trying to use this parser but can not get - target value
public static String parse(String responseBody) {
DOM.Document document = new DOM.Document();
document.load(responseBody);
String sy = document.getRootElement()
.getChildElement('recordset', null)
.getChildElement('field', null).getAttribute('HH', '');
return sy;
}
Does anybody see the mistake?