This simple line of code gives the error “The method getTextContent() is undefined for the type Element”:
String color_string = ( ( Element )( ( Element )inner_node ).getElementsByTagName( "color" ).item( 0 ) ).getTextContent();
I get the error in my Android-java version, but not in my PC-Java which I use for testing and debugging Java code before I run it on the phone.
I have
import org.w3c.dom.Element;
on both versions. And I copied the code from the PC-Java to the Android-Java so I am 100% sure I have the same syntax on both.
The android reference says there is such a method defined for the
Elementclass. So perhaps you are missing some libraries, or have a wrong version.