jasona7 / google-checkout-java-sample-code

Automatically exported from code.google.com/p/google-checkout-java-sample-code
0 stars 0 forks source link

Utils does preorder traversal for elements #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Throughout the code, the Utils class uses 

parent.getElementsByTagName(child);

This method will do a preorder traversal to get all the descendent elements
that might have this name.  If you're doing this from the root, this is
inefficient (and potentially dangerous if you have a repeating element such
as "<name>" in one of the private sections).

In most cases, the code should only search its immediate child elements for
something with that name.

Original issue reported on code.google.com by will.sar...@gmail.com on 30 Apr 2007 at 8:27