public void runTest() throws Throwable {
  Document doc;
  NodeList elementList;
  Element testEmployee;
  Node firstC;
  String childName;
  int nodeType;
  CharacterData employeeIDNode;
  String employeeID;
  doc=(Document)load("hc_staff",false);
  elementList=doc.getElementsByTagName("p");
  testEmployee=(Element)elementList.item(3);
  firstC=testEmployee.getFirstChild();
  nodeType=(int)firstC.getNodeType();
  while (equals(3,nodeType)) {
    firstC=firstC.getNextSibling();
    nodeType=(int)firstC.getNodeType();
  }
  childName=firstC.getNodeName();
  assertEqualsAutoCase("element","childName","em",childName);
  employeeIDNode=(CharacterData)firstC.getFirstChild();
  employeeID=employeeIDNode.getNodeValue();
  assertEquals("employeeID","EMP0004",employeeID);
}

public void runTest ( ) throws Throwable { Document doc ; NodeList elementList ; Element testEmployee ; Node firstC ; String childName ; int nodeType ; CharacterData employeeIDNode ; String employeeID ; doc = ( Document ) load ( "hc_staff" , false ) ; elementList = doc . getElementsByTagName ( "p" ) ; testEmployee = ( Element ) elementList . item ( 3 ) ; firstC = testEmployee . getFirstChild ( ) ; nodeType = ( int ) firstC . getNodeType ( ) ; while ( equals ( 3 , nodeType ) ) { firstC = firstC . getNextSibling ( ) ; nodeType = ( int ) firstC . getNodeType ( ) ; } childName = firstC . getNodeName ( ) ; assertEqualsAutoCase ( "element" , "childName" , "em" , childName ) ; employeeIDNode = ( CharacterData ) firstC . getFirstChild ( ) ; employeeID = employeeIDNode . getNodeValue ( ) ; assertEquals ( "employeeID" , "EMP0004" , employeeID ) ; }
runs the test case .
