The DOM (Document Object Model) represents an XML document as a hierarchy of nodes.
Some nodes may be branch nodes and have child nodes, while others are leaf nodes
with no children.
Here is the steps as listed under FYR :
1. Get DOM document
2. Get root Element
3. Get child Element
4. Get children
Example :
Integer Temp = 0;
for(integer i=0; i<=Temp; i++){
Dom.Document docx = res.getBodyDocument();
dom.XmlNode xroot = docx.getrootelement();
dom.XmlNode [] xrrec = xroot.getChildElements();
for(Dom.XMLNode child : xrrec){
for (dom.XmlNode awr : child.getchildren()){
}
}
}
Cheers ..
Here is the steps as listed under FYR :
1. Get DOM document
2. Get root Element
3. Get child Element
4. Get children
Example :
Integer Temp = 0;
for(integer i=0; i<=Temp; i++){
Dom.Document docx = res.getBodyDocument();
dom.XmlNode xroot = docx.getrootelement();
dom.XmlNode [] xrrec = xroot.getChildElements();
for(Dom.XMLNode child : xrrec){
for (dom.XmlNode awr : child.getchildren()){
}
}
}
Cheers ..
No comments:
Post a Comment