bhanuprakash513 / google-checkout-java-sample-code

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

Utils.getElementStringValue is not comprehensive #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
getElementStringValue uses the following code to return a String: 

  return nl.item(0).getFirstChild().getNodeValue();     

This does not cover the case where you have a mix of text and CDATA nodes.

A better solution is to iterate over the children and append CATA and text
nodes into a stringbuffer.

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