Give me an example on how to parse a custom xml file using DOM
See the sample here:
How to draw a path on a map using kml file?