Hi everyone,
I'm trying to parse my xml string that contains some camel case attributes and for some reason it just doesn't work.
Below is a simple test to help:
@Test
public void xmlAttributeParsingProblem() {
Document oDoc = XMLParser.parse("<toto><tata myAttribute=\"titi\" myAttribute2=\"tete\" test=\"test1\" testMe=\"hello\" test_me=\"world\"><tutu/></tata></toto>");
Node oToto = oDoc.getChildNodes().item(0);
Node oTata = oToto.getFirstChild();
assertEquals("test1", oTata.getAttributes().getNamedItem("test").getNodeValue()); //WORKS
assertEquals("world", oTata.getAttributes().getNamedItem("test_me").getNodeValue()); //WORKS!
assertEquals("hello", oTata.getAttributes().getNamedItem("testMe").getNodeValue()); // DOES NOT WORK
assertEquals("tete", oTata.getAttributes().getNamedItem("myAttribute2").getNodeValue()); // DOES NOT WORK
assertEquals("titi", oTata.getAttributes().getNamedItem("myAttribute").getNodeValue()); // DOES NOT WORK
}
Any ideas why is that happening? is that a GWT thing or what gwt-test-utils use for parsing?
Thanks!