public void testGetInputEncoding() throws Exception {
  assertEquals("US-ASCII",documentA.getInputEncoding());
  assertEquals("ISO-8859-1",documentB.getInputEncoding());
}

public void testGetInputEncoding ( ) throws Exception { assertEquals ( "US-ASCII" , documentA . getInputEncoding ( ) ) ; assertEquals ( "ISO-8859-1" , documentB . getInputEncoding ( ) ) ; }
xml parsers are advised of the document ' s character set via two channels : via the declaration and also the document ' s input source . to test that each of these winds up in the correct location in the document model , we supply different names for each . this is only safe because for the subset of characters in the document , the character sets are equivalent .
