You need to sign in to do that
Don't have an account?
kito kid
get the value of xml current event
If I want to get the value "https://www.test.com/1234" as below. How I can get it using XMLStreamReader.
<item>
....
<guid isPermaLink="false">https://www.test.com</guid>
<link>https://www.test.com/1234</link>
...
</item>
I am using the code below. how should I get the value insides <link> tag.
I used getText(), but get errors.
if(reader.getEventType() == XmlTag.START_ELEMENT && reader.getLocalName() == 'link'){
//get link value
}
It's very easy to use DOM classes :
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_xml_dom_document.htm
See the example, This is exactly what you are looking for.
All Answers
It's very easy to use DOM classes :
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_xml_dom_document.htm
See the example, This is exactly what you are looking for.