I need to get all the values from child node


But i am not able to get then at a single loop i need to loop 2 times to get the values my code

 for(Dom.XMLNode subchild : child.getChildElements()) 
                system.debug('Sub child ' + subchild.getText() );
                for(Dom.XMLNode subchildfield : subchild.getChildren())
                    system.debug('Sub child Field ' + subchildfield.getText() );
                    fName  = subchildfield.getText();
                    //system.debug('Filed Name in XML field  ' + fieldName);

                system.debug('Filed Name before affing to filevalueXML  ' + fieldName);                    
                system.debug('Filed Name after affing to filevalueXML  ' + fileValuesXML);

is it possible to get all the child node values at a single loop so that i can have it in a map. Please guide me

1 Answer 1


These links will help you:

Using APEX DOM parser: http://developer.force.com/cookbook/recipe/parsing-xml-using-the-apex-dom-parser

Using XMLStreamReader class


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .