DOM Level 1 Core Test Suite Matrix

Below you will find a description of and pointer to each test in the DOM TS categorized under interface, attribute and method, sorted alphabetically.

Interface Attr

attrNextSiblingNull (XML Java) The "getNextSibling()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of of the first employee and examine its NextSibling node. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrParentNodeNull (XML Java) The "getParentNode()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of the first employee and examine its parentNode attribute. This test also uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrPreviousSiblingNull (XML Java) The "getPreviousSibling()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of of the first employee and examine its PreviousSibling node. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
namednodemapReturnAttrNode (XML Java) The "getNamedItem(name)" method returns a node of any type specified by name. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="street". This should result in the method returning an Attr node.
characterdataDeleteDataEnd (XML Java) The "getAttributes()" method invoked on an Attribute Node returns null. Retrieve the first attribute from the last child of the first employee and invoke the "getAttributes()" method on the Attribute Node. It should return null.
AttributeTests
name
attrName (XML Java) The getNodeName() method of an Attribute node. Retrieve the attribute named street from the last child of of the second employee and examine its NodeName. This test uses the getNamedItem(name) method from the NamedNodeMap interface.
namednodemapReturnAttrNode (XML Java) The "getNamedItem(name)" method returns a node of any type specified by name. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="street". This should result in the method returning an Attr node.
specified
attrNotSpecifiedValue (XML Java) The "getSpecified()" method for an Attr node should be set to false if the attribute was not explicitly given a value. Retrieve the attribute named "street" from the last child of of the first employee and examine the value returned by the "getSpecified()" method. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrSpecifiedValue (XML Java) The "getSpecified()" method for an Attr node should be set to true if the attribute was explicitly given a value. Retrieve the attribute named "domestic" from the last child of of the first employee and examine the value returned by the "getSpecified()" method. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrSpecifiedValueChanged (XML Java) The "getSpecified()" method for an Attr node should return true if the value of the attribute is changed. Retrieve the attribute named "street" from the last child of of the THIRD employee and change its value to "Yes"(which is the default DTD value). This should cause the "getSpecified()" method to be true. This test uses the "setAttribute(name,value)" method from the Element interface and the "getNamedItem(name)" method from the NamedNodeMap interface.
value
attrCreateTextNode (XML Java) The "setValue()" method for an attribute creates a Text node with the unparsed content of the string. Retrieve the attribute named "street" from the last child of of the fourth employee and assign the "Y%ent1;" string to its value attribute. This value is not yet parsed and therefore should still be the same upon retrieval. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrEntityReplacement (XML Java) The "getValue()" method will return the value of the attribute as a string. The general entity references are replaced with their values. Retrieve the attribute named "street" from the last child of of the fourth employee and examine the string returned by the "getValue()" method. The value should be set to "Yes" after the EntityReference is replaced with its value. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrSetValueNoModificationAllowedErr (XML Java) The "setValue()" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the "domestic" attribute from the entity reference and execute the "setValue()" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
attrSetValueNoModificationAllowedErrEE (XML Java) The "setValue()" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an entity reference using document.createEntityReference() Get the "domestic" attribute from the entity reference and execute the "setValue()" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.

Interface CDATASection

nodeCDATASectionNodeAttribute (XML Java) The "getAttributes()" method invoked on a CDATASection Node returns null. Retrieve the CDATASection node contained inside the second child of the second employee and invoke the "getAttributes()" method on the CDATASection node. It should return null.
nodeCDATASectionNodeName (XML Java) The string returned by the "getNodeName()" method for a CDATASection Node is #cdata-section". Retrieve the CDATASection node inside the second child of the second employee and check the string returned by the "getNodeName()" method. It should be equal to "#cdata-section".
nodeCDATASectionNodeType (XML Java) The "getNodeType()" method for a CDATASection Node returns the constant value 4. Retrieve the CDATASection node contained inside the second child of the second employee and invoke the "getNodeType()" method. The method should return 4.
nodeCDATASectionNodeValue (XML Java) The string returned by the "getNodeValue()" method for a CDATASection Node is the content of the CDATASection. Retrieve the CDATASection node inside the second child of the second employee and check the string returned by the "getNodeValue()" method. It should be equal to "This is a CDATA Section with EntityReference number 2 &ent2;".

Interface CharacterData

AttributeTests
data
cdataSectionGetValue (XML Java) The DOMString attribute of the Text node holds the text that is contained by the CDATA section. Retrieve the last CDATASection node located inside the second child of the second employee and examine its content. Since the CDATASection interface inherits from the CharacterData interface(via the Text node), the "getData()" method can be used to access the CDATA content.
characterdataAppendData (XML Java) The "appendData(arg)" method appends a string to the end of the character data of the node. Retrieve the character data from the second child of the first employee. The appendData(arg) method is called with arg=", Esquire". The method should append the specified data to the already existing character data. The new value return by the "getLength()" method should be 24.
characterdataAppendDataGetData (XML Java) On successful invocation of the "appendData(arg)" method the "getData()" method provides access to the concatentation of data and the specified string. Retrieve the character data from the second child of the first employee. The appendData(arg) method is called with arg=", Esquire". The method should append the specified data to the already existing character data. The new value return by the "getData()" method should be "Margaret Martin, Esquire".
characterdataDeleteDataEnd (XML Java) The "deleteData(offset,count)" method removes a range of characters from the node. Delete data at the end of the character data. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=30 and count=5. The method should delete the characters from position 30 thru position 35. The new value of the character data should be "1230 North Ave. Dallas, Texas".
characterdataDeleteDataExceedsLength (XML Java) If the sum of the offset and count used in the "deleteData(offset,count) method is greater than the length of the character data then all the characters from the offset to the end of the data are deleted. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=4 and count=50. The method should delete the characters from position 4 to the end of the data since the offset+count(50+4) is greater than the length of the character data(35). The new value of the character data should be "1230".
characterdataDeleteDataGetLengthAndData (XML Java) On successful invocation of the "deleteData(offset,count)" method, the "getData()" and "getLength()" methods reflect the changes. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=30 and count=5. The method should delete the characters from position 30 thru position 35. The new value of the character data should be "1230 North Ave. Dallas, Texas" which is returned by the "getData()" method and "getLength()" method should return 30".
characterdataDeleteDataMiddle (XML Java) The "deleteData(offset,count)" method removes a range of characters from the node. Delete data in the middle of the character data. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=16 and count=8. The method should delete the characters from position 16 thru position 24. The new value of the character data should be "1230 North Ave. Texas 98551".
characterdataGetData (XML Java) The "getData()" method retrieves the character data currently stored in the node. Retrieve the character data from the second child of the first employee and invoke the "getData()" method. The method returns the character data string.
characterdataGetLength (XML Java) The "getLength()" method returns the number of characters stored in this nodes data. Retrieve the character data from the second child of the first employee and examine the value returned by the getLength() method.
characterdataInsertDataEnd (XML Java) The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data at the end of the character data. Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=15 and arg=", Esquire". The method should insert the string ", Esquire" at position 15. The new value of the character data should be "Margaret Martin, Esquire".
characterdataInsertDataMiddle (XML Java) The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data in the middle of the character data. Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=9 and arg="Ann". The method should insert the string "Ann" at position 9. The new value of the character data should be "Margaret Ann Martin".
characterdataReplaceDataEnd (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test for replacement at the end of the data. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=30 and count=5 and arg="98665". The method should replace characters 30 thru 34 of the character data with "98665".
characterdataReplaceDataExceedsLengthOfArg (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test the situation where the length of the arg string is greater than the specified offset. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=0 and count=4 and arg="260030". The method should replace characters one thru four with "260030". Note that the length of the specified string is greater that the specified offset.
characterdataReplaceDataExceedsLengthOfData (XML Java) If the sum of the offset and count exceeds the length then all the characters to the end of the data are replaced. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=0 and count=50 and arg="2600". The method should replace all the characters with "2600". This is because the sum of the offset and count exceeds the length of the character data.
characterdataReplaceDataMiddle (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test for replacement in the middle of the data. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=5 and count=5 and arg="South". The method should replace characters five thru 9 of the character data with "South".
characterdataSetDataNoModificationAllowedErr (XML Java) The "setData(data)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "setData(data)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataSetDataNoModificationAllowedErrEE (XML Java) The "setData(data)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "setData(data)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataSetNodeValue (XML Java) The "setNodeValue()" method changes the character data currently stored in the node. Retrieve the character data from the second child of the first employee and invoke the "setNodeValue()" method, call "getData()" and compare.
length
characterdataDeleteDataGetLengthAndData (XML Java) On successful invocation of the "deleteData(offset,count)" method, the "getData()" and "getLength()" methods reflect the changes. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=30 and count=5. The method should delete the characters from position 30 thru position 35. The new value of the character data should be "1230 North Ave. Dallas, Texas" which is returned by the "getData()" method and "getLength()" method should return 30".
characterdataGetLength (XML Java) The "getLength()" method returns the number of characters stored in this nodes data. Retrieve the character data from the second child of the first employee and examine the value returned by the getLength() method.
MethodTests
appendData
characterdataAppendData (XML Java) The "appendData(arg)" method appends a string to the end of the character data of the node. Retrieve the character data from the second child of the first employee. The appendData(arg) method is called with arg=", Esquire". The method should append the specified data to the already existing character data. The new value return by the "getLength()" method should be 24.
characterdataAppendDataGetData (XML Java) On successful invocation of the "appendData(arg)" method the "getData()" method provides access to the concatentation of data and the specified string. Retrieve the character data from the second child of the first employee. The appendData(arg) method is called with arg=", Esquire". The method should append the specified data to the already existing character data. The new value return by the "getData()" method should be "Margaret Martin, Esquire".
characterdataAppendDataNoModificationAllowedErr (XML Java) The "appendData(arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "appendData(arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataAppendDataNoModificationAllowedErrEE (XML Java) The "appendData(arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Add an entity reference to the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "appendData(arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
deleteData
characterdataDeleteDataBeginning (XML Java) The "deleteData(offset,count)" method removes a range of characters from the node. Delete data at the beginning of the character data. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=0 and count=16. The method should delete the characters from position 0 thru position 16. The new value of the character data should be "Dallas, Texas 98551".
characterdataDeleteDataEnd (XML Java) The "deleteData(offset,count)" method removes a range of characters from the node. Delete data at the end of the character data. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=30 and count=5. The method should delete the characters from position 30 thru position 35. The new value of the character data should be "1230 North Ave. Dallas, Texas".
characterdataDeleteDataExceedsLength (XML Java) If the sum of the offset and count used in the "deleteData(offset,count) method is greater than the length of the character data then all the characters from the offset to the end of the data are deleted. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=4 and count=50. The method should delete the characters from position 4 to the end of the data since the offset+count(50+4) is greater than the length of the character data(35). The new value of the character data should be "1230".
characterdataDeleteDataGetLengthAndData (XML Java) On successful invocation of the "deleteData(offset,count)" method, the "getData()" and "getLength()" methods reflect the changes. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=30 and count=5. The method should delete the characters from position 30 thru position 35. The new value of the character data should be "1230 North Ave. Dallas, Texas" which is returned by the "getData()" method and "getLength()" method should return 30".
characterdataDeleteDataMiddle (XML Java) The "deleteData(offset,count)" method removes a range of characters from the node. Delete data in the middle of the character data. Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=16 and count=8. The method should delete the characters from position 16 thru position 24. The new value of the character data should be "1230 North Ave. Texas 98551".
characterdataDeleteDataNoModificationAllowedErr (XML Java) The "deleteData(offset,count)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "deleteData(offset,count)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataDeleteDataNoModificationAllowedErrEE (XML Java) The "deleteData(offset,count)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. Add an reference to ent4. Get the FIRST item from the entity reference and execute the "deleteData(offset,count)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataIndexSizeErrDeleteDataOffsetGreater (XML Java) The "deleteData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater that the number of characters in the string. Retrieve the character data of the last child of the first employee and invoke its "deleteData(offset,count)" method with offset=40 and count=3. It should raise the desired exception since the offset is greater than the number of characters in the string.
characterdataIndexSizeErrDeleteDataOffsetNegative (XML Java) The "deleteData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is negative. Retrieve the character data of the last child of the first employee and invoke its "deleteData(offset,count)" method with offset=-5 and count=3. It should raise the desired exception since the offset is negative.
characterdataIndexSizeErrInsertDataOffsetGreater (XML Java) The "insertData(offset,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater than the number of characters in the string. Retrieve the character data of the last child of the first employee and invoke its insertData"(offset,arg)" method with offset=40 and arg="ABC". It should raise the desired exception since the offset is greater than the number of characters in the string.
characterdataIndexSizeErrReplaceDataOffsetGreater (XML Java) The "replaceData(offset,count,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater than the length of the string. Retrieve the character data of the last child of the first employee and invoke its "replaceData(offset,count,arg) method with offset=40 and count=3 and arg="ABC". It should raise the desired exception since the offset is greater than the length of the string.
insertData
characterdataInsertDataBeginning (XML Java) The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data at the beginning of the character data. Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=0 and arg="Mss.". The method should insert the string "Mss." at position 0. The new value of the character data should be "Mss. Margaret Martin".
characterdataInsertDataEnd (XML Java) The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data at the end of the character data. Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=15 and arg=", Esquire". The method should insert the string ", Esquire" at position 15. The new value of the character data should be "Margaret Martin, Esquire".
characterdataInsertDataMiddle (XML Java) The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data in the middle of the character data. Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=9 and arg="Ann". The method should insert the string "Ann" at position 9. The new value of the character data should be "Margaret Ann Martin".
characterdataInsertDataNoModificationAllowedErr (XML Java) The "insertData(offset,arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "insertData(offset,arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataInsertDataNoModificationAllowedErrEE (XML Java) The "insertData(offset,arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Create an entity reference and execute the "insertData(offset,arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
replaceData
characterdataIndexSizeErrInsertDataOffsetNegative (XML Java) The "insertData(offset,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is negative. Retrieve the character data of the last child of the first employee and invoke its insertData"(offset,arg)" method with offset=-5 and arg="ABC". It should raise the desired exception since the offset is negative.
characterdataIndexSizeErrReplaceDataOffsetNegative (XML Java) The "replaceData(offset,count,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is negative. Retrieve the character data of the last child of the first employee and invoke its "replaceData(offset,count,arg) method with offset=-5 and count=3 and arg="ABC". It should raise the desired exception since the offset is negative.
characterdataReplaceDataBeginning (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test for replacement in the middle of the data. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=5 and count=5 and arg="South". The method should replace characters five thru 9 of the character data with "South".
characterdataReplaceDataEnd (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test for replacement at the end of the data. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=30 and count=5 and arg="98665". The method should replace characters 30 thru 34 of the character data with "98665".
characterdataReplaceDataExceedsLengthOfArg (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test the situation where the length of the arg string is greater than the specified offset. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=0 and count=4 and arg="260030". The method should replace characters one thru four with "260030". Note that the length of the specified string is greater that the specified offset.
characterdataReplaceDataExceedsLengthOfData (XML Java) If the sum of the offset and count exceeds the length then all the characters to the end of the data are replaced. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=0 and count=50 and arg="2600". The method should replace all the characters with "2600". This is because the sum of the offset and count exceeds the length of the character data.
characterdataReplaceDataMiddle (XML Java) The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test for replacement in the middle of the data. Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=5 and count=5 and arg="South". The method should replace characters five thru 9 of the character data with "South".
characterdataReplaceDataNoModificationAllowedErr (XML Java) The "replaceData(offset,count,arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "replaceData(offset,count,arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
characterdataReplaceDataNoModificationAllowedErrEE (XML Java) The "replaceData(offset,count,arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Add an entity reference tp the THIRD "gender" element. Get the FIRST item from the entity reference and execute the "replaceData(offset,count,arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
substringData
characterdataIndexSizeErrDeleteDataCountNegative (XML Java) The "deleteData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified count is negative. Retrieve the character data of the last child of the first employee and invoke its "deleteData(offset,count)" method with offset=10 and count=-3. It should raise the desired exception since the count is negative.
characterdataIndexSizeErrReplaceDataCountNegative (XML Java) The "replaceData(offset,count,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified count is negative. Retrieve the character data of the last child of the first employee and invoke its "replaceData(offset,count,arg) method with offset=10 and count=-3 and arg="ABC". It should raise the desired exception since the count is negative.
characterdataIndexSizeErrSubstringCountNegative (XML Java) The "substringData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified count is negative. Retrieve the character data of the last child of the first employee and invoke its "substringData(offset,count) method with offset=10 and count=-3. It should raise the desired exception since the count is negative.
characterdataIndexSizeErrSubstringNegativeOffset (XML Java) The "substringData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is negative. Retrieve the character data of the last child of the first employee and invoke its "substringData(offset,count) method with offset=-5 and count=3. It should raise the desired exception since the offset is negative.
characterdataIndexSizeErrSubstringOffsetGreater (XML Java) The "substringData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater than the number of characters in the string. Retrieve the character data of the last child of the first employee and invoke its "substringData(offset,count) method with offset=40 and count=3. It should raise the desired exception since the offsets value is greater than the length.
characterdataSubStringExceedsValue (XML Java) If the sum of the "offset" and "count" exceeds the "length" then the "substringData(offset,count)" method returns all the characters to the end of the data. Retrieve the character data from the second child of the first employee and access part of the data by using the substringData(offset,count) method with offset=9 and count=10. The method should return the substring "Martin" since offset+count > length (19 > 15).
characterdataSubStringValue (XML Java) The "substringData(offset,count)" method returns the specified string. Retrieve the character data from the second child of the first employee and access part of the data by using the substringData(offset,count) method. The method should return the specified substring starting at position "offset" and extract "count" characters. The method should return the string "Margaret".

Interface Comment

nodeCommentNodeAttributes (XML Java) The "getAttributes()" method invoked on a Comment Node returns null. Retrieve the Comment Node(third child) of the DOM document and invoke the "getAttributes()" method on the Comment Node. It should return null.
nodeCommentNodeName (XML Java) The string returned by the "getNodeName()" method for a Comment Node is "#comment". Retrieve the Comment node in the XML file and check the string returned by the "getNodeName()" method. It should be equal to "#comment".
nodeCommentNodeType (XML Java) The "getNodeType()" method for a Comment Node returns the constant value 8. Retrieve the nodes from the document and check for a comment node and invoke the "getNodeType()" method. This should return 8.
nodeCommentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Comment Node is the content of the comment. Retrieve the comment in the XML file and check the string returned by the "getNodeValue()" method. It should be equal to "This is comment number 1".
nodevalue02 (XML Java) An comment is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.

Interface Document

nodedocumentnodeattribute (XML Java) The "getAttributes()" method invoked on a Document Node returns null. Retrieve the DOM Document and invoke the "getAttributes()" method on the Document Node. It should return null.
nodeDocumentNodeName (XML Java) The string returned by the "getNodeName()" method for a Document Node is "#document". Retrieve the DOM document and check the string returned by the "getNodeName()" method. It should be equal to "#document".
nodeDocumentNodeType (XML Java) The "getNodeType()" method for a Document Node returns the constant value 9. Retrieve the document and invoke the "getNodeType()" method. The method should return 9.
nodeDocumentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Document Node is null. Retrieve the DOM Document and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodevalue01 (XML Java) An element is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue06 (XML Java) An document is accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
AttributeTests
doctype
documentGetDocType (XML Java) The "getDoctype()" method returns the Document Type Declaration associated with this document. Retrieve the entire DOM document and invoke its "getDoctype()" method. The name of the document type should be returned. The "getName()" method should be equal to "staff".
documentGetDocTypeNoDTD (XML Java) The "getDoctype()" method returns null for XML documents without a document type declaration. Retrieve the XML document without a DTD and invoke the "getDoctype()" method. It should return null.
documenttypeGetDocType (XML Java) The "getName()" method contains the name of the DTD. Retrieve the Document Type for this document and examine the string returned by the "getName()" method. It should be set to "staff".
nodevalue04 (XML Java) An document type accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
documentElement
documentGetRootNode (XML Java) The "getDocumentElement()" method provides direct access to the child node that is the root element of the document. Retrieve the entire DOM document and invoke its "getDocumentElement()" method. It should return an Element node whose NodeName is "staff".
implementation
documentGetImplementation (XML Java) The "getImplementation()" method returns the DOMImplementation object that handles this document. Retrieve the entire DOM document and invoke its "getImplementation()" method. It should return a DOMImplementation whose "hasFeature("XML","1.0") method returns the boolean value "true".
MethodTests
createAttribute
documentCreateAttribute (XML Java) The "createAttribute(name)" method creates an Attribute node of the given name. Retrieve the entire DOM document and invoke its "createAttribute(name)" method. It should create a new Attribute node with the given name. The name, value and type of the newly created object are retrieved and output.
documentInvalidCharacterExceptionCreateAttribute (XML Java) The "createAttribute(tagName)" method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character. Retrieve the entire DOM document and invoke its "createAttribute(tagName)" method with the tagName equal to the string "invalid^Name". Due to the invalid character the desired EXCEPTION should be raised.
createCDATASection
documentCreateCDATASection (XML Java) The "createCDATASection(data)" method creates a new CDATASection node whose value is the specified string. Retrieve the entire DOM document and invoke its "createCDATASection(data)" method. It should create a new CDATASection node whose "data" is the specified string. The content, name and type are retrieved and output.
createComment
commentGetComment (XML Java) A comment is all the characters between the starting '<!--' and ending '-->' Retrieve the nodes of the DOM document. Search for a comment node and the content is its value.
documentCreateComment (XML Java) The "createComment(data)" method creates a new Comment node given the specified string. Retrieve the entire DOM document and invoke its "createComment(data)" method. It should create a new Comment node whose "data" is the specified string. The content, name and type are retrieved and output.
createDocumentFragment
attrCreateDocumentFragment (XML Java) Attr nodes may be associated with Element nodes contained within a DocumentFragment. Create a new DocumentFragment and add a newly created Element node(with one attribute). Once the element is added, its attribute should be available as an attribute associated with an Element within a DocumentFragment.
documentCreateDocumentFragment (XML Java) The "createDocumentFragment()" method creates an empty DocumentFragment object. Retrieve the entire DOM document and invoke its "createDocumentFragment()" method. The content, name, type and value of the newly created object are output.
createElement
documentCreateElement (XML Java) The "createElement(tagName)" method creates an Element of the type specified. Retrieve the entire DOM document and invoke its "createElement(tagName)" method with tagName="address". The method should create an instance of an Element node whose tagName is "address". The NodeName, NodeType and NodeValue are returned.
documentCreateElementCaseSensitive (XML Java) The tagName parameter in the "createElement(tagName)" method is case-sensitive for XML documents. Retrieve the entire DOM document and invoke its "createElement(tagName)" method twice. Once for tagName equal to "address" and once for tagName equal to "ADDRESS" Each call should create a distinct Element node. The newly created Elements are then assigned attributes that are retrieved.
documentCreateElementDefaultAttr (XML Java) The "createElement(tagName)" method creates an Element of the type specified. In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element. Retrieve the entire DOM document and invoke its "createElement(tagName)" method with tagName="address". The method should create an instance of an Element node whose tagName is "address". The tagName "address" has an attribute with default values, therefore the newly created element will have them.
documentInvalidCharacterExceptionCreateElement (XML Java) The "createElement(tagName)" method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character. Retrieve the entire DOM document and invoke its "createElement(tagName)" method with the tagName equal to the string "invalid^Name". Due to the invalid character the desired EXCEPTION should be raised.
createEntityReference
documentCreateEntityReference (XML Java) The "createEntityReference(name)" method creates an EntityReferrence node. Retrieve the entire DOM document and invoke its "createEntityReference(name)" method. It should create a new EntityReference node for the Entity with the given name. The name, value and type are retrieved and output.
documentCreateEntityReferenceKnown (XML Java) The "createEntityReference(name)" method creates an EntityReference node. In addition, if the referenced entity is known, the child list of the "EntityReference" node is the same as the corresponding "Entity" node. Retrieve the entire DOM document and invoke its "createEntityReference(name)" method. It should create a new EntityReference node for the Entity with the given name. The referenced entity is known, therefore the child list of the "EntityReference" node is the same as the corresponding "Entity" node.
documentInvalidCharacterExceptionCreateEntRef (XML Java) The "createEntityReference(tagName)" method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character. Retrieve the entire DOM document and invoke its "createEntityReference(tagName)" method with the tagName equal to the string "invalid^Name". Due to the invalid character the desired EXCEPTION should be raised.
createProcessingInstruction
documentCreateProcessingInstruction (XML Java) The "createProcessingInstruction(target,data)" method creates a new ProcessingInstruction node with the specified name and data string. Retrieve the entire DOM document and invoke its "createProcessingInstruction(target,data)" method. It should create a new PI node with the specified target and data. The target, data and type are retrieved and output.
documentInvalidCharacterExceptionCreatePI (XML Java) The "createProcessingInstruction(target,data) method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character. Retrieve the entire DOM document and invoke its "createProcessingInstruction(target,data)" method with the tagName equal to the string "invalid^Name". Due to the invalid character the desired EXCEPTION should be raised.
createTextNode
documentCreateTextNode (XML Java) The "createTextNode(data)" method creates a Text node given the specfied string. Retrieve the entire DOM document and invoke its "createTextNode(data)" method. It should create a new Text node whose "data" is the specified string. The NodeName and NodeType are also checked.
getElementsByTagName
documentGetElementsByTagNameLength (XML Java) The "getElementsByTagName(tagName)" method returns a NodeList of all the Elements with a given tagName. Retrieve the entire DOM document and invoke its "getElementsByTagName(tagName)" method with tagName equal to "name". The method should return a NodeList that contains 5 elements.
documentGetElementsByTagNameTotalLength (XML Java) The "getElementsByTagName(tagName)" method returns a NodeList of all the Elements in the tree when the tagName is equal to " ". Retrieve the entire DOM document and invoke its "getElementsByTagName(tagName)" method with tagName equal to " ". The method should return a NodeList that contains all the elements of the document.
documentGetElementsByTagNameValue (XML Java) The "getElementsByTagName(tagName)" method returns a NodeList of all the Elements with a given tagName in a pre-order traversal of the tree. Retrieve the entire DOM document and invoke its "getElementsByTagName(tagName)" method with tagName equal to "name". The method should return a NodeList that contains 5 elements. The FOURTH item in the list is retrieved and output.

Interface DocumentFragment

attrCreateDocumentFragment (XML Java) Attr nodes may be associated with Element nodes contained within a DocumentFragment. Create a new DocumentFragment and add a newly created Element node(with one attribute). Once the element is added, its attribute should be available as an attribute associated with an Element within a DocumentFragment.
nodeDocumentFragmentNodeName (XML Java) The string returned by the "getNodeName()" method for a DocumentFragment Node is "#document-frament". Retrieve the DOM document and invoke the "createDocumentFragment()" method and check the string returned by the "getNodeName()" method. It should be equal to "#document-fragment".
nodeDocumentFragmentNodeType (XML Java) The "getNodeType()" method for a DocumentFragment Node returns the constant value 11. Invoke the "createDocumentFragment()" method and examine the NodeType of the document fragment returned by the "getNodeType()" method. The method should return 11.
nodeDocumentFragmentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a DocumentFragment Node is null. Retrieve the DOM document and invoke the "createDocumentFragment()" method and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodevalue05 (XML Java) An document type accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.

Interface DocumentType

AttributeTests
entities
documenttypeGetEntities (XML Java) The "getEntities()" method is a NamedNodeMap that contains the general entities for this document. Retrieve the Document Type for this document and create a NamedNodeMap of all its entities. The entire map is traversed and the names of the entities are retrieved. There should be 5 entities. Duplicates should be ignored.
documenttypeGetEntitiesLength (XML Java) Duplicate entities are to be discarded. Retrieve the Document Type for this document and create a NamedNodeMap of all its entities. The entity named "ent1" is defined twice and therefore that last occurrance should be discarded.
documenttypeGetEntitiesType (XML Java) Every node in the map returned by the "getEntities()" method implements the Entity interface. Retrieve the Document Type for this document and create a NamedNodeMap of all its entities. Traverse the entire list and examine the NodeType of each node in the list.
name
documenttypeGetDocType (XML Java) The "getName()" method contains the name of the DTD. Retrieve the Document Type for this document and examine the string returned by the "getName()" method. It should be set to "staff".
notations
documenttypeGetNotations (XML Java) The "getNotations()" method creates a NamedNodeMap that contains all the notations declared in the DTD. Retrieve the Document Type for this document and create a NamedNodeMap object of all the notations. There should be two items in the list (notation1 and notation2).
documenttypeGetNotationsType (XML Java) Every node in the map returned by the "getNotations()" method implements the Notation interface. Retrieve the Document Type for this document and create a NamedNodeMap object of all the notations. Traverse the entire list and examine the NodeType of each node.

Interface DOMImplementation

MethodTests
hasFeature
domimplementationFeatureNoVersion (XML Java) If the "version" parameter is an empty string in the "hasFeature(feature,version)" method then supporting any version of the feature will cause the method to return true. Retrieve the entire DOM document and invoke its "getImplementation()" method. This should create a DOMImplementation object whose "hasFeature(feature, version)" method is invoked with version equal to "". If the version is not specified, supporting any version feature will cause the method to return "true".
domimplementationFeatureNull (XML Java) If the "version" parameter is not null in the "hasFeature(feature,version)" method then supporting any version of the feature will cause the method to return true. Retrieve the entire DOM document and invoke its "getImplementation()" method. This should create a DOMImplementation object whose "hasFeature(feature, version)" method is invoked with version equal to "". If the version is not specified, supporting any version feature will cause the method to return "true".
domimplementationFeaturexml (XML Java) The "feature" parameter in the "hasFeature(feature,version)" method is the package name of the feature. Legal values are XML and HTML. (Test for xml, lower case) Retrieve the entire DOM document and invoke its "getImplementation()" method. This should create a DOMImplementation object whose "hasFeature(feature, version)" method is invoked with "feature" equal to "xml". The method should return a boolean "true".

Interface Element

textParseIntoListOfElements (XML Java) If there is markup inside the Text element content then the text is parsed into a list of elements and text that forms the list of children of the element. Retrieve the textual data from the last child of the second employee. That node is composed of two EntityReference nodes and two Text nodes. After the content node is parsed, the "address" Element should contain four children with each one of the EntityReferences containing one child.
AttributeTests
tagName
elementGetTagName (XML Java) The "getTagName()" method returns the tagName of an element. Invoke the "getTagName()" method one the root node. The value returned should be "staff".
elementRetrieveTagName (XML Java) The "getElementsByTagName()" method returns a NodeList of all descendant elements with a given tagName. Invoke the "getElementsByTagName()" method and create a NodeList of "position" elements. Retrieve the second "position" element in the list and return the NodeName.
MethodTests
getAttribute
elementGetElementEmpty (XML Java) The "getAttribute(name)" method returns an empty string if no value was assigned to an attribute and no default value was given in the DTD file. Retrieve the last child of the last employee, then invoke "getAttribute(name)" method, where "name" is an attribute without a specified or DTD default value. The "getAttribute(name)" method should return the empty string. This method makes use of the "createAttribute(newAttr)" method from the Document interface.
elementRetrieveAttrValue (XML Java) The "getAttribute(name)" method returns an attribute value by name. Retrieve the second address element, then invoke the 'getAttribute("street")' method. This should return the value of the attribute("No").
getAttributeNode
elementGetAttributeNode (XML Java) The "getAttributeNode(name)" method retrieves an attribute node by name. Retrieve the attribute "domestic" from the last child of the first employee. Since the method returns an Attr object, the "name" can be examined to ensure the proper attribute was retrieved.
elementGetAttributeNodeNull (XML Java) The "getAttributeNode(name)" method retrieves an attribute node by name. It should return null if the "name" attribute does not exist. Retrieve the last child of the first employee and attempt to retrieve a non-existing attribute. The method should return "null". The non-existing attribute to be used is "invalidAttribute".
getElementsByTagName
elementGetElementsByTagName (XML Java) The "getElementsByTagName(name)" method returns a list of all descendant Elements with the given tag name. Test for an empty list. Create a NodeList of all the descendant elements using the string "noMatch" as the tagName. The method should return a NodeList whose length is "0" since there are not any descendant elements that match the given tag name.
elementGetElementsByTagName (XML Java) The "getElementsByTagName(name)" method returns a list of all descendant Elements in the order the children were encountered in a pre order traversal of the element tree. Create a NodeList of all the descendant elements using the string "employee" as the tagName. The method should return a NodeList whose length is "5" in the order the children were encountered. Access the FOURTH element in the NodeList. The FOURTH element also has children and the first child of this element should be "#text".
elementGetElementsByTagName (XML Java) The "getElementsByTagName(name)" method returns a list of all descendant Elements with the given tag name. Create a NodeList of all the descendant elements using the string "employee" as the tagName. The method should return a NodeList whose length is "5".
elementGetElementsByTagNamesSpecialValue (XML Java) The "getElementsByTagName(name)" method may use the special value "*" to match all tags in the element tree. Create a NodeList of all the descendant elements of the last employee by using the special value "*". The method should return all the descendant children(6) in the order the children were encountered.
normalize
cdataSectionNormalize (XML Java) Adjacent CDATASection nodes cannot be merged together by use of the "normalize()" method from the Element interface. Retrieve second child of the second employee and invoke the "normalize()" method. The Element under contains two CDATASection nodes that should not be merged together by the "normalize()" method.
elementNormalize (XML Java) The "normalize()" method puts all the nodes in the full depth of the sub-tree underneath this element into a "normal" form. Retrieve the third employee and access its second child. This child contains a block of text that is spread across multiple lines. The content of the "name" child should be parsed and treated as a single Text node.
removeAttribute
attrSpecifiedValueRemove (XML Java) To respecify the attribute to its default value from the DTD, the attribute must be deleted. This will then make a new attribute available with the "getSpecified()" method value set to false. Retrieve the attribute named "street" from the last child of of the THIRD employee and delete it. This should then create a new attribute with its default value and also cause the "getSpecified()" method to return false. This test uses the "removeAttribute(name)" method from the Element interface and the "getNamedItem(name)" method from the NamedNodeMap interface.
elementRemoveAttribute (XML Java) The "removeAttribute(name)" removes an attribute by name. If the attribute has a default value, it is immediately replaced. Retrieve the attribute named "street" from the last child of the fourth employee, then remove the "street" attribute by invoking the "removeAttribute(name)" method. The "street" attribute has a default value defined in the DTD file, that value should immediately replace the old value.
elementRemoveAttributeNoModificationAllowedErr (XML Java) The "removeAttribute(name)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "removeAttribute(name)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
elementRemoveAttributeNoModificationAllowedErr (XML Java) The "removeAttribute(name)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an reference the entity ent4 and add it to the THIRD "gender" element. Try to remove the "domestic" attribute from the entity reference by executing the "removeAttribute(name)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
removeAttributeNode
elementNotFoundErr (XML Java) The "removeAttributeNode(oldAttr)" method raises a NOT_FOUND_ERR DOMException if the "oldAttr" attribute is not an attribute of the element. Retrieve the last employee and attempt to remove a non existing attribute node. This should cause the intended exception to be raised. This test makes use of the "createAttribute(name)" method from the Document interface.
elementRemoveAttributeAfterCreate (XML Java) The "removeAttributeNode(oldAttr)" method removes the specified attribute. Retrieve the last child of the third employee, add a new "district" node to it and then try to remove it. To verify that the node was removed use the "getNamedItem(name)" method from the NamedNodeMap interface. It also uses the "getAttributes()" method from the Node interface.
elementRemoveAttributeNode (XML Java) The "removeAttributeNode(oldAttr)" method returns the node that was removed. Retrieve the last child of the third employee and remove its "street" Attr node. The method should return the old attribute node.
elementRemoveAttributeNodeNoModificationAllowedErr (XML Java) The "removeAttributeNode(oldAttr)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "removeAttributeNode(oldAttr)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
elementRemoveAttributeNodeNoModificationAllowedErrEE (XML Java) The "removeAttributeNode(oldAttr)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an entity reference and add it to the children of the THIRD "gender" element. Try to remove the "domestic" attribute from the entity reference by executing the "removeAttributeNode(oldAttr)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
elementRemoveAttributeRestoreDefaultValue (XML Java) The "removeAttributeNode(oldAttr)" method removes the specified attribute node and restores any default values. Retrieve the last child of the third employeed and remove its "street" Attr node. Since this node has a default value defined in the DTD file, that default should immediately be the new value.
setAttribute
attrCreateDocumentFragment (XML Java) Attr nodes may be associated with Element nodes contained within a DocumentFragment. Create a new DocumentFragment and add a newly created Element node(with one attribute). Once the element is added, its attribute should be available as an attribute associated with an Element within a DocumentFragment.
elementAddNewAttribute (XML Java) The "setAttribute(name,value)" method adds a new attribute to the Element Retrieve the last child of the last employee, then add an attribute to it by invoking the "setAttribute(name,value)" method. It should create a "name" attribute with an assigned value equal to "value".
elementChangeAttributeValue (XML Java) The "setAttribute(name,value)" method adds a new attribute to the Element. If the "name" is already present, then its value should be changed to the new one that is in the "value" parameter. Retrieve the last child of the fourth employee, then add an attribute to it by invoking the "setAttribute(name,value)" method. Since the name of the used attribute("street") is already present in this element, then its value should be changed to the new one of the "value" parameter.
elementInvalidCharacterException (XML Java) The "setAttribute(name,value)" method raises an "INVALID_CHARACTER_ERR DOMException if the specified name contains an invalid character. Retrieve the last child of the first employee and call its "setAttribute(name,value)" method with "name" containing an invalid character.
elementSetAttributeNoModificationAllowedErr (XML Java) The "setAttribute(name,value)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "setAttribute(name,value)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
elementSetAttributeNoModificationAllowedErr (XML Java) The "setAttribute(name,value)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Add an ent4 reference to the children of the THIRD "gender" element. Try to remove the "domestic" attribute from the entity reference by executing the "setAttribute(name,value)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
setAttributeNode
elementCreateNewAttribute (XML Java) The "setAttributeNode(newAttr)" method adds a new attribute to the Element. Retrieve first address element and add a new attribute node to it by invoking its "setAttributeNode(newAttr)" method. This test makes use of the "createAttribute(name)" method from the Document interface.
elementInUseAttributeErr (XML Java) The "setAttributeNode(newAttr)" method raises an "INUSE_ATTRIBUTE_ERR DOMException if the "newAttr" is already an attribute of another element. Retrieve the last child of the second employee and append a newly created element. The "createAttribute(name)" and "setAttributeNode(newAttr)" methods are invoked to create and add a new attribute to the newly created Element. The "setAttributeNode(newAttr)" method is once again called to add the new attribute causing an exception to be raised since the attribute is already an attribute of another element.
elementReplaceAttributeWithSelf (XML Java) This test calls setAttributeNode to replace an attribute with itself. Since the node is not an attribute of another Element, it would be inappropriate to throw an INUSE_ATTRIBUTE_ERR. This test was derived from elementinuserattributeerr which inadvertanly made this test.
elementReplaceExistingAttributeGeValue (XML Java) If the "setAttributeNode(newAttr)" method replaces an existing Attr node with the same name, then it should return the previously existing Attr node. Retrieve the last child of the third employee and add a new attribute node. The new attribute node is "street", which is already present in this Element. The method should return the existing Attr node(old "street" Attr). This test uses the "createAttribute(name)" method from the Document interface.
elementSetAttributeNodeNoModificationAllowedErr (XML Java) The "setAttributeNode(newAttr)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "setAttributeNode(newAttr)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
elementSetAttributeNodeNoModificationAllowedErr (XML Java) The "setAttributeNode(newAttr)" method for an attribute causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an entity reference and add to the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "setAttributeNode(newAttr)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
elementSetAttributeNodeNull (XML Java) The "setAttributeNode(newAttr)" method returns the null value if no previously existing Attr node with the same name was replaced. Retrieve the last child of the third employee and add a new attribute to it. The new attribute node added is "district", which is not part of this Element. The method should return the null value. This test uses the "createAttribute(name)" method from the Document interface.
elementWrongDocumentErr (XML Java) The "setAttributeNode(newAttr)" method raises an "WRONG_DOCUMENT_ERR DOMException if the "newAttr" was created from a different document than the one that created this document. Retrieve the last employee and attempt to set a new attribute node for its "employee" element. The new attribute was created from a document other than the one that created this element, therefore a WRONG_DOCUMENT_ERR DOMException should be raised. This test uses the "createAttribute(newAttr)" method from the Document interface.

Interface Entity

entityGetEntityName (XML Java) The nodeName attribute that is inherited from Node contains the name of the entity. Retrieve the entity named "ent1" and access its name by invoking the "getNodeName()" method inherited from the Node interface.
nodeEntitySetNodeValue (XML Java) The string returned by the "getNodeValue()" method for an Entity Node is always null and "setNodeValue" should have no effect. Retrieve the first Entity declaration in the "DOCTYPE" section of the XML file, call setNodeValue with a non-null value and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodevalue07 (XML Java) An Entity is accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
AttributeTests
notationName
entityGetPublicId (XML Java) The "getPublicId()" method of an Entity node contains the public identifier associated with the entity, if one was specified. Retrieve the entity named "ent5" and access its public identifier. The string "entityURI" should be returned.
publicId
entityGetPublicId (XML Java) The "getPublicId()" method of an Entity node contains the public identifier associated with the entity, if one was specified. Retrieve the entity named "ent5" and access its public identifier. The string "entityURI" should be returned.
entityGetPublicIdNull (XML Java) The "getPublicId()" method of an Entity node contains the public identifier associated with the entity, if one was not specified a null value should be returned. Retrieve the entity named "ent1" and access its public identifier. Since a public identifier was not specified for this entity, the "getPublicId()" method should return null.
systemId
entityGetPublicId (XML Java) The "getPublicId()" method of an Entity node contains the public identifier associated with the entity, if one was specified. Retrieve the entity named "ent5" and access its public identifier. The string "entityURI" should be returned.

Interface EntityReference

textParseIntoListOfElements (XML Java) If there is markup inside the Text element content then the text is parsed into a list of elements and text that forms the list of children of the element. Retrieve the textual data from the last child of the second employee. That node is composed of two EntityReference nodes and two Text nodes. After the content node is parsed, the "address" Element should contain four children with each one of the EntityReferences containing one child.
nodevalue03 (XML Java) An entity reference is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.

Interface NamedNodeMap

AttributeTests
length
namednodemapChildNodeRange (XML Java) The range of valid child node indices is 0 to Length -1. Create a NamedNodeMap object from the attributes of the last child of the third employee and traverse the list from index 0 thru length -1. All indices should be valid.
namednodemapNumberOfNodes (XML Java) The "getLength()" method returns the number of nodes in the map. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getLength()" method is executed. The number of nodes should be 2.
MethodTests
getNamedItem
attrDefaultValue (XML Java) If there is not an explicit value assigned to an attribute and there is a declaration for this attribute and that declaration includes a default value, then that default value is the attributes default value. Retrieve the attribute named "street" from the last child of of the first employee and examine its value. That value should be the value given the attribute in the DTD file. The test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrEffectiveValue (XML Java) If an Attr is explicitly assigned any value, then that value is the attributes effective value. Retrieve the attribute named "domestic" from the last child of of the first employee and examine its nodeValue attribute. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
namednodemapGetNamedItem (XML Java) The "getNamedItem(name)" method retrieves a node specified by name. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="domestic". This should result in the domestic Attr node being returned.
namednodemapReturnAttrNode (XML Java) The "getNamedItem(name)" method returns a node of any type specified by name. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="street". This should result in the method returning an Attr node.
namednodemapReturnNull (XML Java) The "getNamedItem(name)" method returns null of the specified name did not identify any node in the map. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="district". This name does not match any names in the list therefore the method should return null.
item
namednodemapChildNodeRange (XML Java) The range of valid child node indices is 0 to Length -1. Create a NamedNodeMap object from the attributes of the last child of the third employee and traverse the list from index 0 thru length -1. All indices should be valid.
namednodemapGetNamedItem (XML Java) The "getNamedItem(name)" method retrieves a node specified by name. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="domestic". This should result in the domestic Attr node being returned.
namednodemapRemoveNamedItem (XML Java) The "removeNamedItem(name)" method removes a node specified by name. Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". This should result in the removal of the specified attribute and the "getSpecified()" method should return false.
namednodemapRemoveNamedItemGetValue (XML Java) If the node removed by the "removeNamedItem(name)" method is an Attr node with a default value it is immediately replaced. Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". The "removeNamedItem(name)" method should remove the "street" attribute and since it has a default value of "Yes", that value should immediately be the attributes value.
namednodemapRemoveNamedItemReturnNodeValue (XML Java) The "removeNamedItem(name)" method returns the node removed from the map. Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". The "removeNamedItem(name)" method should remove the existing "street" attribute and return it.
namednodemapReturnFirstItem (XML Java) The "item(index)" method returns the indexth item in the map(test for first item). Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Since the DOM does not specify an order of these nodes the contents of the FIRST node can contain either "domestic" or "street". The test should return "true" if the FIRST node is either of these values.
namednodemapReturnLastItem (XML Java) The "item(index)" method returns the indexth item in the map(test for last item). Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Since the DOM does not specify an order of these nodes the contents of the LAST node can contain either "domestic" or "street". The test should return "true" if the LAST node is either of these values.
namednodemapSetNamedItem (XML Java) The "setNamedItem(arg)" method adds a node using its nodeName attribute. Retrieve the second employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created. The "setNamedItem(arg)" method should add then new node to the NamedNodeItem object by using its "nodeName" attribute("district'). This node is then retrieved using the "getNamedItem(name)" method. This test uses the "createAttribute(name)" method from the document interface.
namednodemapSetNamedItemReturnValue (XML Java) If the "setNamedItem(arg)" method replaces an already existing node with the same name then the already existing node is returned. Retrieve the third employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created and whose node name already exists in the map. The "setNamedItem(arg)" method should replace the already existing node with the new one and return the existing node. This test uses the "createAttribute(name)" method from the document interface.
namednodemapSetNamedItemThatExists (XML Java) If the node to be added by the "setNamedItem(arg)" method already exists in the NamedNodeMap, it is replaced by the new one. Retrieve the second employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created and whose node name already exists in the map. The "setNamedItem(arg)" method should replace the already existing node with the new one. This node is then retrieved using the "getNamedItem(name)" method. This test uses the "createAttribute(name)" method from the document interface
namednodemapSetNamedItemWithNewValue (XML Java) If the "setNamedItem(arg)" method does not replace an existing node with the same name then it returns null. Retrieve the third employee and create a NamedNodeMap object from the attributes of the last child. Once the list is created the "setNamedItem(arg)" method is invoked with arg=newAttr, where newAttr is a newly created Attr Node and whose node name already exists in the map. The "setNamedItem(arg)" method should add the new node and return null. This test uses the "createAttribute(name)" method from the document interface.
removeNamedItem
namednodemapNotFoundErr (XML Java) The "removeNamedItem(name)" method raises a NOT_FOUND_ERR DOMException if there is not a node named "name" in the map. Create a NamedNodeMap object from the attributes of the last child of the third employee and attempt to remove the "district" attribute. There is not a node named "district" in the list and therefore the desired exception should be raised.
namednodemapRemoveNamedItem (XML Java) The "removeNamedItem(name)" method removes a node specified by name. Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". This should result in the removal of the specified attribute and the "getSpecified()" method should return false.
namednodemapRemoveNamedItemGetValue (XML Java) If the node removed by the "removeNamedItem(name)" method is an Attr node with a default value it is immediately replaced. Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". The "removeNamedItem(name)" method should remove the "street" attribute and since it has a default value of "Yes", that value should immediately be the attributes value.
namednodemapRemoveNamedItemReturnNodeValue (XML Java) The "removeNamedItem(name)" method returns the node removed from the map. Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". The "removeNamedItem(name)" method should remove the existing "street" attribute and return it.
setNamedItem
namedNodeMapInUseAttributeErr (XML Java) The "setNamedItem(arg)" method raises a INUSE_ATTRIBUTE_ERR DOMException if "arg" is an Attr that is already in an attribute of another Element. Create a NamedNodeMap object from the attributes of the last child of the third employee and attempt to add an attribute that is already being used by the first employee. This should raise the desired exception.
namednodemapSetNamedItem (XML Java) The "setNamedItem(arg)" method adds a node using its nodeName attribute. Retrieve the second employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created. The "setNamedItem(arg)" method should add then new node to the NamedNodeItem object by using its "nodeName" attribute("district'). This node is then retrieved using the "getNamedItem(name)" method. This test uses the "createAttribute(name)" method from the document interface.
namednodemapSetNamedItemReturnValue (XML Java) If the "setNamedItem(arg)" method replaces an already existing node with the same name then the already existing node is returned. Retrieve the third employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created and whose node name already exists in the map. The "setNamedItem(arg)" method should replace the already existing node with the new one and return the existing node. This test uses the "createAttribute(name)" method from the document interface.
namednodemapSetNamedItemThatExists (XML Java) If the node to be added by the "setNamedItem(arg)" method already exists in the NamedNodeMap, it is replaced by the new one. Retrieve the second employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created and whose node name already exists in the map. The "setNamedItem(arg)" method should replace the already existing node with the new one. This node is then retrieved using the "getNamedItem(name)" method. This test uses the "createAttribute(name)" method from the document interface
namednodemapSetNamedItemWithNewValue (XML Java) If the "setNamedItem(arg)" method does not replace an existing node with the same name then it returns null. Retrieve the third employee and create a NamedNodeMap object from the attributes of the last child. Once the list is created the "setNamedItem(arg)" method is invoked with arg=newAttr, where newAttr is a newly created Attr Node and whose node name already exists in the map. The "setNamedItem(arg)" method should add the new node and return null. This test uses the "createAttribute(name)" method from the document interface.
namednodemapWrongDocumentErr (XML Java) The "setNamedItem(arg)" method raises a WRONG_DOCUMENT_ERR DOMException if "arg" was created from a different document than the one that created the NamedNodeMap. Create a NamedNodeMap object from the attributes of the last child of the third employee and attempt to add another Attr node to it that was created from a different DOM document. This should raise the desired exception. This method uses the "createAttribute(name)" method from the Document interface.

Interface Node

AttributeTests
attributes
attrDefaultValue (XML Java) If there is not an explicit value assigned to an attribute and there is a declaration for this attribute and that declaration includes a default value, then that default value is the attributes default value. Retrieve the attribute named "street" from the last child of of the first employee and examine its value. That value should be the value given the attribute in the DTD file. The test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
attrEffectiveValue (XML Java) If an Attr is explicitly assigned any value, then that value is the attributes effective value. Retrieve the attribute named "domestic" from the last child of of the first employee and examine its nodeValue attribute. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
elementAssociatedAttribute (XML Java) Elements may have attributes associated with them. Retrieve the first attribute from the last child of the first employee and invoke the "getSpecified()" method. This test is only intended to show that Elements can actually have attributes. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
elementRetrieveAllAttributes (XML Java) The "getAttributes()" method(Node Interface) may be used to retrieve the set of all attributes of an element. Create a list of all the attributes of the last child of the first employee by using the "getAttributes()" method. Examine the length of the attribute list. This test uses the "getLength()" method from the NameNodeMap interface.
namednodemapChildNodeRange (XML Java) The range of valid child node indices is 0 to Length -1. Create a NamedNodeMap object from the attributes of the last child of the third employee and traverse the list from index 0 thru length -1. All indices should be valid.
namednodemapNumberOfNodes (XML Java) The "getLength()" method returns the number of nodes in the map. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getLength()" method is executed. The number of nodes should be 2.
namednodemapReturnAttrNode (XML Java) The "getNamedItem(name)" method returns a node of any type specified by name. Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="street". This should result in the method returning an Attr node.
characterdataDeleteDataEnd (XML Java) The "getAttributes()" method invoked on an Attribute Node returns null. Retrieve the first attribute from the last child of the first employee and invoke the "getAttributes()" method on the Attribute Node. It should return null.
nodeCDATASectionNodeAttribute (XML Java) The "getAttributes()" method invoked on a CDATASection Node returns null. Retrieve the CDATASection node contained inside the second child of the second employee and invoke the "getAttributes()" method on the CDATASection node. It should return null.
nodeCloneAttributesCopied (XML Java) If the "cloneNode(deep)" method was used to clone an Element node, all the attributes of the Element are copied along with their values. Retrieve the last child of the second employee and inoke the "cloneNode(deep)" method with deep=true. The duplicate node returned by the method should copy the attributes associated with this node.
nodeCommentNodeAttributes (XML Java) The "getAttributes()" method invoked on a Comment Node returns null. Retrieve the Comment Node(third child) of the DOM document and invoke the "getAttributes()" method on the Comment Node. It should return null.
nodeDocumentFragmentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a DocumentFragment Node is null. Retrieve the DOM document and invoke the "createDocumentFragment()" method and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodedocumentnodeattribute (XML Java) The "getAttributes()" method invoked on a Document Node returns null. Retrieve the DOM Document and invoke the "getAttributes()" method on the Document Node. It should return null.
nodeElementNodeAttributes (XML Java) The "getAttributes()" method invoked on an Element Node returns a NamedNodeMap containing the attributes of this node. Retrieve the last child of the third employee and invoke the "getAttributes()" method. It should return a NamedNodeMap containing the attributes of the Element node.
nodeEntityNodeAttributes (XML Java) The "getAttributes()" method invoked on an Entity Node returns null. Retrieve the first Entity declaration in the "DOCTYPE" section of the XML file and invoke the "getAttributes()" method on the Entity Node. It should return null.
nodeEntityReferenceNodeAttributes (XML Java) The "getAttributes()" method invoked on an EntityReference Node returns null. Retrieve the first Entity Reference node from the last child of the second employee and invoke the "getAttributes()" method on the EntityReference node. It should return null.
nodeNotationNodeAttributes (XML Java) The "getAttributes()" method invoked on a Notation Node returns null. Retrieve the Notation declaration inside the DocumentType node and invoke the "getAttributes()" method on the Notation Node. It should return null.
nodeProcessingInstructionNodeAttributes (XML Java) The "getAttributes()" method invoked on a Processing Instruction Node returns null. Retrieve the Processing Instruction node and invoke the "getAttributes()" method. It should return null.
nodeTextNodeAttribute (XML Java) The "getAttributes()" method invoked on a Text Node returns null. Retrieve the Text node from the last child of the first employee and invoke the "getAttributes()" method on the Text Node. It should return null.
childNodes
nodeChildNodes (XML Java) The "getChildNodes()" method returns a NodeList that contains all children of this node. Retrieve the second employee and check the NodeList returned by the "getChildNodes()" method. The length of the list should be 13.
nodeChildNodesAppendChild (XML Java) The NodeList returned by the "getChildNodes()" method is live. Changes on the node's children are immediately reflected on the nodes returned in the NodeList. Create a NodeList of the children of the second employee and then add a newly created element that was created by the "createElement()" method(Document Interface) to the second employee by using the "appendChild()" method. The length of the NodeList should reflect this new addition to the child list. It should return the value 14.
nodeChildNodesEmpty (XML Java) The "getChildNodes()" method returns a NodeList that contains all children of this node. If there are not any children, this is a NodeList that does not contain any nodes. Retrieve the Text node from the second child of the second employee and invoke the "getChildNodes()" method. The NodeList returned should not have any nodes.
nodeHasChildNodesFalse (XML Java) The "hasChildNodes()" method returns false if the node does not have any children. Retrieve the Text node inside the first child of the second employee and invoke the "hasChildNodes()" method. It should return the boolean value "false".
textParseIntoListOfElements (XML Java) If there is markup inside the Text element content then the text is parsed into a list of elements and text that forms the list of children of the element. Retrieve the textual data from the last child of the second employee. That node is composed of two EntityReference nodes and two Text nodes. After the content node is parsed, the "address" Element should contain four children with each one of the EntityReferences containing one child.
firstChild
nodeGetFirstChild (XML Java) The "getFirstChild()" method returns the first child of this node. Retrieve the second employee and invoke the "getFirstChild()" method. The NodeName returned should be "#text".
nodeGetFirstChildNull (XML Java) If there is not a first child then the "getFirstChild()" method returns null. Retrieve the Text node form the second child of the first employee and invoke the "getFirstChild()" method. It should return null.
lastChild
nodeGetLastChild (XML Java) The "getLastChild()" method returns the last child of this node. Retrieve the second employee and invoke the "getLastChild()" method. The NodeName returned should be "#text".
nodeGetLastChildNull (XML Java) If there is not a last child then the "getLastChild()" method returns null. Retrieve the Text node from the second child of the first employee and invoke the "getLastChild()" method. It should return null.
nextSibling
attrNextSiblingNull (XML Java) The "getNextSibling()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of of the first employee and examine its NextSibling node. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
nodeGetNextSibling (XML Java) The "getNextSibling()" method returns the node immediately following this node. Retrieve the first child of the second employee and invoke the "getNextSibling()" method. It should return a node with the NodeName of "#text".
nodeGetNextSiblingNull (XML Java) If there is not a node immediately following this node the "getNextSibling()" method returns null. Retrieve the first child of the second employee and invoke the "getNextSibling()" method. It should be set to null.
nodeName
attrName (XML Java) The getNodeName() method of an Attribute node. Retrieve the attribute named street from the last child of of the second employee and examine its NodeName. This test uses the getNamedItem(name) method from the NamedNodeMap interface.
commentGetComment (XML Java) A comment is all the characters between the starting '<!--' and ending '-->' Retrieve the nodes of the DOM document. Search for a comment node and the content is its value.
elementRetrieveTagName (XML Java) The "getElementsByTagName()" method returns a NodeList of all descendant elements with a given tagName. Invoke the "getElementsByTagName()" method and create a NodeList of "position" elements. Retrieve the second "position" element in the list and return the NodeName.
entityGetEntityName (XML Java) The nodeName attribute that is inherited from Node contains the name of the entity. Retrieve the entity named "ent1" and access its name by invoking the "getNodeName()" method inherited from the Node interface.
nodeAppendChildGetNodeName (XML Java) The "appendChild(newChild)" method returns the node added. Append a newly created node to the child list of the second employee and check the NodeName returned. The "getNodeName()" method should return "newChild".
nodeAttributeNodeName (XML Java) The string returned by the "getNodeName()" method for an Attribute Node is the name of the Attribute. Retrieve the Attribute named "domestic" from the last child of the first employee and check the string returned by the "getNodeName()" method. It should be equal to "domestic".
nodeCDATASectionNodeName (XML Java) The string returned by the "getNodeName()" method for a CDATASection Node is #cdata-section". Retrieve the CDATASection node inside the second child of the second employee and check the string returned by the "getNodeName()" method. It should be equal to "#cdata-section".
nodeCommentNodeName (XML Java) The string returned by the "getNodeName()" method for a Comment Node is "#comment". Retrieve the Comment node in the XML file and check the string returned by the "getNodeName()" method. It should be equal to "#comment".
nodeDocumentFragmentNodeName (XML Java) The string returned by the "getNodeName()" method for a DocumentFragment Node is "#document-frament". Retrieve the DOM document and invoke the "createDocumentFragment()" method and check the string returned by the "getNodeName()" method. It should be equal to "#document-fragment".
nodeDocumentNodeName (XML Java) The string returned by the "getNodeName()" method for a Document Node is "#document". Retrieve the DOM document and check the string returned by the "getNodeName()" method. It should be equal to "#document".
nodeDocumentTypeNodeName (XML Java) The string returned by the "getNodeName()" method for a DocumentType node is the name of the document type. Retrieve the DOCTYPE declaration from the XML file and check the string returned by the "getNodeName()" method. It should be equal to "staff".
nodeElementNodeName (XML Java) The string returned by the "getNodeName()" method for an Element Node is its tagName. Retrieve the first Element Node(Root Node) of the DOM object and check the string returned by the "getNodeName()" method. It should be equal to its tagName.
nodeEntityNodeName (XML Java) The string returned by the "getNodeName()" method for an Entity Node is the Entity name. Retrieve the first Entity declaration in the "DOCTYPE" section of the XML file and check the string returned by the "getNodeName()" method. It should be equal to "ent1".
nodeEntityReferenceNodeName (XML Java) The string returned by the "getNodeName()" method for an EntityReference Node is the name of the entity referenced. Retrieve the first Entity Reference node from the last child of the second employee and check the string returned by the "getNodeName()" method. It should be equal to "ent2".
nodeInsertBeforeNodeName (XML Java) The "insertBefore(newChild,refchild)" method returns the node being inserted. Insert an Element node before the fourth child of the second employee and check the node returned from the "insertBefore(newChild,refChild)" method. The node returned should be "newChild".
nodeNotationNodeName (XML Java) The string returned by the "getNodeName()" method for a Notation Node is the name of the notation. Retrieve the Notation declaration inside the DocumentType node and check the string returned by the "getNodeName()" method. It should be equal to "notation1".
nodeProcessingInstructionNodeName (XML Java) The string returned by the "getNodeName()" method for a Processing Instruction Node is the target. Retrieve the Processing Instruction Node in the XML file and check the string returned by the "getNodeName()" method. It should be equal to "XML-STYLE".
nodeRemoveChildGetNodeName (XML Java) The "removeChild(oldChild)" method returns the node being removed. Remove the first child of the second employee and check the NodeName returned by the "removeChild(oldChild)" method. The returned node should have a NodeName equal to "#text".
nodeReplaceChildNodeName (XML Java) The "replaceChild(newChild,oldChild)" method returns the node being replaced. Replace the second Element of the second employee with a newly created node Element and check the NodeName returned by the "replaceChild(newChild,oldChild)" method. The returned node should have a NodeName equal to "employeeId".
nodeTextNodeName (XML Java) The string returned by the "getNodeName()" method for a Text Node is "#text". Retrieve the Text Node from the last child of the first employee and check the string returned by the "getNodeName()" method. It should be equal to "#text".
notationGetNotationName (XML Java) The nodeName attribute that is inherited from Node contains the name of the notation. Retrieve the notation named "notation1" and access its name by invoking the "getNodeName()" method inherited from the Node interface.
nodeType
commentGetComment (XML Java) A comment is all the characters between the starting '<!--' and ending '-->' Retrieve the nodes of the DOM document. Search for a comment node and the content is its value.
nodeAttributeNodeType (XML Java) The "getNodeType()" method for an Attribute Node returns the constant value 2. Retrieve the first attribute from the last child of the first employee and invoke the "getNodeType()" method. The method should return 2.
nodeCDATASectionNodeType (XML Java) The "getNodeType()" method for a CDATASection Node returns the constant value 4. Retrieve the CDATASection node contained inside the second child of the second employee and invoke the "getNodeType()" method. The method should return 4.
nodeCommentNodeType (XML Java) The "getNodeType()" method for a Comment Node returns the constant value 8. Retrieve the nodes from the document and check for a comment node and invoke the "getNodeType()" method. This should return 8.
nodeDocumentFragmentNodeType (XML Java) The "getNodeType()" method for a DocumentFragment Node returns the constant value 11. Invoke the "createDocumentFragment()" method and examine the NodeType of the document fragment returned by the "getNodeType()" method. The method should return 11.
nodeDocumentNodeType (XML Java) The "getNodeType()" method for a Document Node returns the constant value 9. Retrieve the document and invoke the "getNodeType()" method. The method should return 9.
nodeDocumentTypeNodeType (XML Java) The "getNodeType()" method for a DocumentType Node returns the constant value 10. Retrieve the DTD from the XML file and invoke the "getNodeType()" method. The method should return 10.
nodeElementNodeType (XML Java) The "getNodeType()" method for an Element Node returns the constant value 1. Retrieve the root node and invoke the "getNodeType()" method. The method should return 1.
nodeEntityNodeType (XML Java) The "getNodeType()" method for an Entity Node returns the constant value 6. Retrieve the first Entity declaration in the "DOCTYPE" section of the XML file and invoke the "getNodeType()" method. The method should return 6.
nodeEntityReferenceNodeType (XML Java) The "getNodeType()" method for an EntityReference Node returns the constant value 5. Retrieve the EntityReference node from the last child of the second employee and invoke the "getNodeType()" method. The method should return 5.
nodeNotationNodeType (XML Java) The "getNodeType()" method for an Notation Node returns the constant value 12. Retrieve the Notation declaration in the DocumentType node and invoke the "getNodeType()" method. The method should return 12.
nodeProcessingInstructionNodeType (XML Java) The "getNodeType()" method for a Processing Instruction node returns the constant value 7. Retrieve a NodeList of child elements from the document. Retrieve the first child and invoke the "getNodeType()" method. The method should return 7.
nodeTextNodeType (XML Java) The "getNodeType()" method for a Text Node returns the constant value 3. Retrieve the Text node from the last child of the first employee and invoke the "getNodeType()" method. The method should return 3.
nodeValue
attrCreateTextNode2 (XML Java) The "setNodeValue()" method for an attribute creates a Text node with the unparsed content of the string. Retrieve the attribute named "street" from the last child of of the fourth employee and assign the "Y%ent1;" string to its value attribute. This value is not yet parsed and therefore should still be the same upon retrieval. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
commentGetComment (XML Java) A comment is all the characters between the starting '<!--' and ending '-->' Retrieve the nodes of the DOM document. Search for a comment node and the content is its value.
documentCreateEntityReference (XML Java) The "createEntityReference(name)" method creates an EntityReferrence node. Retrieve the entire DOM document and invoke its "createEntityReference(name)" method. It should create a new EntityReference node for the Entity with the given name. The name, value and type are retrieved and output.
documentGetDocType (XML Java) The "getDoctype()" method returns the Document Type Declaration associated with this document. Retrieve the entire DOM document and invoke its "getDoctype()" method. The name of the document type should be returned. The "getName()" method should be equal to "staff".
nodeAttributeNodeValue (XML Java) The string returned by the "getNodeValue()" method for an Attribute Node is the value of the Attribute. Retrieve the Attribute named "domestic" from the last child of the first employee and check the string returned by the "getNodeValue()" method. It should be equal to "Yes".
nodeCDATASectionNodeValue (XML Java) The string returned by the "getNodeValue()" method for a CDATASection Node is the content of the CDATASection. Retrieve the CDATASection node inside the second child of the second employee and check the string returned by the "getNodeValue()" method. It should be equal to "This is a CDATA Section with EntityReference number 2 &ent2;".
nodeCommentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Comment Node is the content of the comment. Retrieve the comment in the XML file and check the string returned by the "getNodeValue()" method. It should be equal to "This is comment number 1".
nodeDocumentFragmentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a DocumentFragment Node is null. Retrieve the DOM document and invoke the "createDocumentFragment()" method and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeDocumentNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Document Node is null. Retrieve the DOM Document and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeElementNodeValue (XML Java) The string returned by the "getNodeValue()" method for an Element Node is null. Retrieve the root node of the DOM object and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeEntityNodeValue (XML Java) The string returned by the "getNodeValue()" method for an Entity Node is null. Retrieve the first Entity declaration in the "DOCTYPE" section of the XML file and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeEntitySetNodeValue (XML Java) The string returned by the "getNodeValue()" method for an Entity Node is always null and "setNodeValue" should have no effect. Retrieve the first Entity declaration in the "DOCTYPE" section of the XML file, call setNodeValue with a non-null value and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeEntityReferenceNodeValue (XML Java) The string returned by the "getNodeValue()" method for an EntityReference Node is null. Retrieve the first Entity Reference node from the last child of the second employee and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeNotationNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Notation Node is null. Retrieve the Notation declaration inside the DocumentType node and check the string returned by the "getNodeValue()" method. It should be equal to null.
nodeProcessingInstructionNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Processing Instruction Node is the content of the Processing Instruction(exclude the target). Retrieve the Processing Instruction node in the XML file and check the string returned by the "getNodeValue()" method. It should be equal to "PIDATA".
nodeProcessingInstructionSetNodeValue (XML Java) Setting the nodeValue should change the value returned by nodeValue and ProcessingInstruction.getData.
nodeSetNodeValueNoModificationAllowedErr (XML Java) The "setNodeValue(nodeValue)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the SECOND item from the entity reference and execute the "setNodeValue(nodeValue)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeSetNodeValueNoModificationAllowedErrEE (XML Java) The "setNodeValue(nodeValue)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an entity reference and execute the "setNodeValue(nodeValue)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeTextNodeValue (XML Java) The string returned by the "getNodeValue()" method for a Text Node is the content of the Text node. Retrieve the Text node from the last child of the first employee and check the string returned by the "getNodeValue()" method. It should be equal to "1230 North Ave. Dallas, Texas 98551".
textWithNoMarkup (XML Java) If there is not any markup inside an Element or Attr node content, then the text is contained in a single object implementing the Text interface that is the only child of the element. Retrieve the textual data from the second child of the third employee. That Text node contains a block of multiple text lines without markup, so they should be treated as a single Text node. The "getNodeValue()" method should contain the combination of the two lines.
nodevalue01 (XML Java) An element is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue02 (XML Java) An comment is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue03 (XML Java) An entity reference is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue04 (XML Java) An document type accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue05 (XML Java) An document type accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue06 (XML Java) An document is accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue07 (XML Java) An Entity is accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue08 (XML Java) An notation is accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
nodevalue09 (XML Java) An processing instruction is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
ownerDocument
nodeGetOwnerDocument (XML Java) The "getOwnerDocument()" method returns the Document object associated with this node. Retrieve the second employee and examine Document returned by the "getOwnerDocument()" method. Invoke the "getDocumentElement()" on the Document which will return an Element that is equal to "staff".
nodeGetOwnerDocumentNull (XML Java) The "getOwnerDocument()" method returns null if the target node itself is a document. Invoke the "getOwnerDocument()" method on the master document. The Document returned should be null.
parentNode
attrParentNodeNull (XML Java) The "getParentNode()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of the first employee and examine its parentNode attribute. This test also uses the "getNamedItem(name)" method from the NamedNodeMap interface.
nodeParentNode (XML Java) The "getParentNode()" method returns the parent of this node. Retrieve the second employee and invoke the "getParentNode()" method on this node. It should be set to "staff".
nodeParentNodeNull (XML Java) The "getParentNode()" method invoked on a node that has just been created and not yet added to the tree is null. Create a new "employee" Element node using the "createElement(name)" method from the Document interface. Since this new node has not yet been added to the tree, the "getParentNode()" method will return null.
previousSibling
attrPreviousSiblingNull (XML Java) The "getPreviousSibling()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of of the first employee and examine its PreviousSibling node. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.
nodeGetPreviousSibling (XML Java) The "getPreviousSibling()" method returns the node immediately preceding this node. Retrieve the second child of the second employee and invoke the "getPreviousSibling()" method. It should return a node with a NodeName of "#text".
nodeGetPreviousSiblingNull (XML Java) If there is not a node immediately preceding this node the "getPreviousSibling()" method returns null. Retrieve the first child of the second employee and invoke the "getPreviousSibling()" method. It should be set to null.
MethodTests
appendChild
nodeAppendChild (XML Java) The "appendChild(newChild)" method adds the node "newChild" to the end of the list of children of the node. Retrieve the second employee and append a new Element node to the list of children. The last node in the list is then retrieved and its NodeName examined. The "getNodeName()" method should return "newChild".
nodeAppendChildChildExists (XML Java) If the "newChild" is already in the tree, it is first removed before the new one is appended. Retrieve the first child of the second employee and append the first child to the end of the list. After the "appendChild(newChild)" method is invoked the first child should be the one that was second and the last child should be the one that was first.
nodeAppendChildDocFragment (XML Java) If the "newChild" is a DocumentFragment object then all its content is added to the child list of this node. Create and populate a new DocumentFragment object and append it to the second employee. After the "appendChild(newChild)" method is invoked retrieve the new nodes at the end of the list, they should be the two Element nodes from the DocumentFragment.
nodeAppendChildGetNodeName (XML Java) The "appendChild(newChild)" method returns the node added. Append a newly created node to the child list of the second employee and check the NodeName returned. The "getNodeName()" method should return "newChild".
nodeAppendChildInvalidNodeType (XML Java) The "appendChild(newChild)" method raises a HIERARCHY_REQUEST_ERR DOMException if this node is of a type that does not allow children of the type "newChild" to be inserted. Retrieve the root node and attempt to append a newly created Attr node. An Element node cannot have children of the "Attr" type, therefore the desired exception should be raised.
nodeAppendChildNewChildDiffDocument (XML Java) The "appendChild(newChild)" method raises a WRONG_DOCUMENT_ERR DOMException if the "newChild" was created from a different document than the one that created this node. Retrieve the second employee and attempt to append a node created from a different document. An attempt to make such a replacement should raise the desired exception.
nodeAppendChildNodeAncestor (XML Java) The "appendChild(newChild)" method raises a HIERARCHY_REQUEST_ERR DOMException if the node to append is one of this node's ancestors. Retrieve the second employee and attempt to append an ancestor node(root node) to it. An attempt to make such an addition should raise the desired exception.
nodeAppendChildNoModificationAllowedErr (XML Java) The "appendChild(newChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "appendChild(newChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeAppendChildNoModificationAllowedErrEE (XML Java) The "appendChild(newChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an ent3 entity reference and the "appendChild(newChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeChildNodesAppendChild (XML Java) The NodeList returned by the "getChildNodes()" method is live. Changes on the node's children are immediately reflected on the nodes returned in the NodeList. Create a NodeList of the children of the second employee and then add a newly created element that was created by the "createElement()" method(Document Interface) to the second employee by using the "appendChild()" method. The length of the NodeList should reflect this new addition to the child list. It should return the value 14.
cloneNode
nodeCloneFalseNoCopyText (XML Java) The "cloneNode(deep)" method does not copy text unless it is deep cloned.(Test for deep=false) Retrieve the fourth child of the second employee and the "cloneNode(deep)" method with deep=false. The duplicate node returned by the method should not copy any text data contained in this node.
nodeCloneGetParentNull (XML Java) The duplicate node returned by the "cloneNode(deep)" method does not have a ParentNode. Retrieve the second employee and invoke the "cloneNode(deep)" method with deep=false. The duplicate node returned should return null when the "getParentNode()" is invoked.
nodeCloneNodeFalse (XML Java) The "cloneNode(deep)" method returns a copy of the node only if deep=false. Retrieve the second employee and invoke the "cloneNode(deep)" method with deep=false. The method should only clone this node. The NodeName and length of the NodeList are checked. The "getNodeName()" method should return "employee" and the "getLength()" method should return 0.
nodeCloneNodeTrue (XML Java) The "cloneNode(deep)" method returns a copy of the node and the subtree under it if deep=true. Retrieve the second employee and invoke the "cloneNode(deep)" method with deep=true. The method should clone this node and the subtree under it. The NodeName of each child in the returned node is checked to insure the entire subtree under the second employee was cloned.
nodeCloneTrueCopyText (XML Java) The "cloneNode(deep)" method does not copy text unless it is deep cloned.(Test for deep=true) Retrieve the eighth child of the second employee and the "cloneNode(deep)" method with deep=true. The duplicate node returned by the method should copy any text data contained in this node.
hasChildNodes
nodeHasChildNodes (XML Java) The "hasChildNodes()" method returns true if the node has children. Retrieve the root node("staff") and invoke the "hasChildNodes()" method. It should return the boolean value "true".
nodeHasChildNodesFalse (XML Java) The "hasChildNodes()" method returns false if the node does not have any children. Retrieve the Text node inside the first child of the second employee and invoke the "hasChildNodes()" method. It should return the boolean value "false".
insertBefore
nodeInsertBefore (XML Java) The "insertBefore(newChild,refChild)" method inserts the node "newChild" before the node "refChild". Insert a newly created Element node before the eigth child of the second employee and check the "newChild" and "refChild" after insertion for correct placement.
nodeInsertBeforeDocFragment (XML Java) If the "newChild" is a DocumentFragment object then all its children are inserted in the same order before the the "refChild". Create a DocumentFragment object and populate it with two Element nodes. Retrieve the second employee and insert the newly created DocumentFragment before its fourth child. The second employee should now have two extra children("newChild1" and "newChild2") at positions fourth and fifth respectively.
nodeInsertBeforeInvalidNodeType (XML Java) The "insertBefore(newChild,refChild)" method raises a HIERARCHY_REQUEST_ERR DOMException if this node is of a type that does not allow children of the type "newChild" to be inserted. Retrieve the root node and attempt to insert a newly created Attr node. An Element node cannot have children of the "Attr" type, therefore the desired exception should be raised.
nodeInsertBeforeNewChildDiffDocument (XML Java) The "insertBefore(newChild,refChild)" method raises a WRONG_DOCUMENT_ERR DOMException if the "newChild" was created from a different document than the one that created this node. Retrieve the second employee and attempt to insert a new child that was created from a different document than the one that created the second employee. An attempt to insert such a child should raise the desired exception.
nodeInsertBeforeNewChildExists (XML Java) If the "newChild" is already in the tree, the "insertBefore(newChild,refChild)" method must first remove it before the insertion takes place. Insert a node Element ("employeeId") that is already present in the tree. The existing node should be removed first and the new one inserted. The node is inserted at a different position in the tree to assure that it was indeed inserted.
nodeInsertBeforeNodeAncestor (XML Java) The "insertBefore(newChild,refChild)" method raises a HIERARCHY_REQUEST_ERR DOMException if the node to be inserted is one of this nodes ancestors. Retrieve the second employee and attempt to insert a node that is one of its ancestors(root node). An attempt to insert such a node should raise the desired exception.
nodeInsertBeforeNodeName (XML Java) The "insertBefore(newChild,refchild)" method returns the node being inserted. Insert an Element node before the fourth child of the second employee and check the node returned from the "insertBefore(newChild,refChild)" method. The node returned should be "newChild".
nodeInsertBeforeNoModificationAllowedErr (XML Java) The "insertBefore(newChild,refChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "insertBefore(newChild,refChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeInsertBeforeNoModificationAllowedErrEE (XML Java) The "insertBefore(newChild,refChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an ent3 element and and execute the "insertBefore(newChild,refChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeInsertBeforeRefChildNonexistent (XML Java) The "insertBefore(newChild,refChild)" method raises a NOT_FOUND_ERR DOMException if the reference child is not a child of this node. Retrieve the second employee and attempt to insert a new node before a reference node that is not a child of this node. An attempt to insert before a non child node should raise the desired exception.
nodeInsertBeforeRefChildNull (XML Java) If the "refChild" is null then the "insertBefore(newChild,refChild)" method inserts the node "newChild" at the end of the list of children. Retrieve the second employee and invoke the "insertBefore(newChild,refChild)" method with refChild=null. Since "refChild" is null the "newChild" should be added to the end of the list. The last item in the list is checked after insertion. The last Element node of the list should be "newChild".
removeChild
nodeRemoveChild (XML Java) The "removeChild(oldChild)" method removes the child node indicated by "oldChild" from the list of children and returns it. Remove the first employee by invoking the "removeChild(oldChild)" method an checking the node returned by the "getParentNode()" method. It should be set to null.
nodeRemoveChildGetNodeName (XML Java) The "removeChild(oldChild)" method returns the node being removed. Remove the first child of the second employee and check the NodeName returned by the "removeChild(oldChild)" method. The returned node should have a NodeName equal to "#text".
nodeRemoveChildNode (XML Java) The "removeChild(oldChild)" method removes the node indicated by "oldChild". Retrieve the second employee and remove its first child. After the removal, the second employee should have twelve children and the first child should now be the child that used to be at the second position in the list.
nodeRemoveChildNoModificationAllowedErr (XML Java) The "removeChild(oldChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "removeChild(oldChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeRemoveChildNoModificationAllowedErrEE (XML Java) The "removeChild(oldChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an entity reference and execute the "removeChild(oldChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeRemoveChildOldChildNonexistent (XML Java) The "removeChild(oldChild)" method raises a NOT_FOUND_ERR DOMException if the old child is not a child of this node. Retrieve the second employee and attempt to remove a node that is not one of its children. An attempt to remove such a node should raise the desired exception.
replaceChild
nodeReplaceChild (XML Java) The "replaceChild(newChild,oldChild)" method replaces the node "oldChild" with the node "newChild". Replace the first element of the second employee with a newly created Element node. Check the first position after the replacement operation is completed. The new Element should be "newChild".
nodeReplaceChildInvalidNodeType (XML Java) The "replaceChild(newChild,oldChild)" method raises a HIERARCHY_REQUEST_ERR DOMException if this node is of a type that does not allow children of the type "newChild" to be inserted. Retrieve the root node and attempt to replace one of its children with a newly created Attr node. An Element node cannot have children of the "Attr" type, therefore the desired exception should be raised.
nodeReplaceChildNewChildDiffDocument (XML Java) The "replaceChild(newChild,oldChild)" method raises a WRONG_DOCUMENT_ERR DOMException if the "newChild" was created from a different document than the one that created this node. Retrieve the second employee and attempt to replace one of its children with a node created from a different document. An attempt to make such a replacement should raise the desired exception.
nodeReplaceChildNewChildExists (XML Java) If the "newChild" is already in the tree, it is first removed before the new one is added. Retrieve the second employee and replace its TWELFTH child(address) with its SECOND child(employeeId). After the replacement the second child should now be the one that used to be at the third position and the TWELFTH child should be the one that used to be at the SECOND position.
nodeReplaceChildNodeAncestor (XML Java) The "replaceChild(newChild,oldChild)" method raises a HIERARCHY_REQUEST_ERR DOMException if the node to put in is one of this node's ancestors. Retrieve the second employee and attempt to replace one of its children with an ancestor node(root node). An attempt to make such a replacement should raise the desired exception.
nodeReplaceChildNodeName (XML Java) The "replaceChild(newChild,oldChild)" method returns the node being replaced. Replace the second Element of the second employee with a newly created node Element and check the NodeName returned by the "replaceChild(newChild,oldChild)" method. The returned node should have a NodeName equal to "employeeId".
nodeReplaceChildNoModificationAllowedErr (XML Java) The "replaceChild(newChild,oldChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "replaceChild(newChild,oldChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeReplaceChildNoModificationAllowedErrEE (XML Java) The "replaceChild(newChild,oldChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an entity reference execute the "replaceChild(newChild,oldChild)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
nodeReplaceChildOldChildNonexistent (XML Java) The "replaceChild(newChild,oldChild)" method raises a NOT_FOUND_ERR DOMException if the old child is not a child of this node. Retrieve the second employee and attempt to replace a node that is not one of its children. An attempt to replace such a node should raise the desired exception.

Interface NodeList

AttributeTests
length
nodelistIndexGetLength (XML Java) The "getLength()" method returns the number of nodes in the list. Create a list of all the children elements of the third employee and invoke the "getLength()" method. It should contain the value 13.
nodelistIndexGetLengthOfEmptyList (XML Java) The "getLength()" method returns the number of nodes in the list.(Test for EMPTY list) Create a list of all the children of the Text node inside the first child of the third employee and invoke the "getLength()" method. It should contain the value 0.
nodelistTraverseList (XML Java) The range of valid child node indices is 0 thru length -1 Create a list of all the children elements of the third employee and traverse the list from index=0 thru length -1.
MethodTests
item
nodelistIndexEqualZero (XML Java) The items in the list are accessible via an integral index starting from zero. (Index equal 0) Create a list of all the children elements of the third employee and access its first child by using an index of 0. This should result in the whitspace before "employeeId" being selected (employeeId when ignoring whitespace). Further we evaluate its content(by using the "getNodeName()" method) to ensure the proper element was accessed.
nodelistIndexNotZero (XML Java) The items in the list are accessible via an integral index starting from zero. (Index not equal 0) Create a list of all the children elements of the third employee and access its fourth child by using an index of 3. This should result in "name" being selected. Further we evaluate its content(by using the "getNodeName()" method) to ensure the proper element was accessed.
nodelistReturnFirstItem (XML Java) The "item(index)" method returns the indexth item in the collection. Create a list of all the children elements of the third employee and access its first child by invoking the "item(index)" method with an index=0. This should result in "#text" being returned. Further we evaluate its content(by using the "getNodeName()" method) to ensure the proper element was accessed.
nodelistReturnLastItem (XML Java) The "item(index)" method returns the indexth item in the collection. Create a list of all the children elements of the third employee and access its last child by invoking the "item(index)" method with an index=12. This should result in "#text" being returned. Further we evaluate its content(by using the "getNodeName()" method) to ensure the proper element was accessed.
nodelistTraverseList (XML Java) The range of valid child node indices is 0 thru length -1 Create a list of all the children elements of the third employee and traverse the list from index=0 thru length -1.

Interface Notation

notationGetNotationName (XML Java) The nodeName attribute that is inherited from Node contains the name of the notation. Retrieve the notation named "notation1" and access its name by invoking the "getNodeName()" method inherited from the Node interface.
nodevalue08 (XML Java) An notation is accessed, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
AttributeTests
publicId
notationGetPublicId (XML Java) The "getPublicId()" method of a Notation node contains the public identifier associated with the notation, if one was specified. Retrieve the notation named "notation1" and access its public identifier. The string "notation1File" should be returned.
notationGetPublicIdNull (XML Java) The "getPublicId()" method of a Notation node contains the public identifier associated with the notation, if one was not specified a null value should be returned. Retrieve the notation named "notation2" and access its public identifier. Since a public identifier was not specified for this notation, the "getPublicId()" method should return null.
systemId
notationGetSystemId (XML Java) The "getSystemId()" method of a Notation node contains the system identifier associated with the notation, if one was specified. Retrieve the notation named "notation2" and access its system identifier. The string "notation2File" should be returned.
notationGetSystemIdNull (XML Java) The "getSystemId()" method of a Notation node contains the system identifier associated with the notation, if one was not specified a null value should be returned. Retrieve the notation named "notation1" and access its system identifier. Since a system identifier was not specified for this notation, the "getSystemId()" method should return null.

Interface ProcessingInstruction

nodeProcessingInstructionSetNodeValue (XML Java) Setting the nodeValue should change the value returned by nodeValue and ProcessingInstruction.getData.
nodevalue09 (XML Java) An processing instruction is created, setNodeValue is called with a non-null argument, but getNodeValue should still return null.
AttributeTests
data
nodeProcessingInstructionSetNodeValue (XML Java) Setting the nodeValue should change the value returned by nodeValue and ProcessingInstruction.getData.
processinginstructionGetData (XML Java) The "getData()" method returns the content of the processing instruction. It starts at the first non white character following the target and ends at the character immediately preceding the "?>". Retrieve the ProcessingInstruction node located immediately after the prolog. Create a nodelist of the child nodes of this document. Invoke the "getData()" method on the first child in the list. This should return the content of the ProcessingInstruction.
processinginstructionSetDataNoModificationAllowedErr (XML Java) The "setData(data)" method for a processing instruction causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "setData(data)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
processinginstructionSetDataNoModificationAllowedErrEE (XML Java) The "setData(data)" method for a processing instruction causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly. Create an ent4 entity reference and add to document of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "setData(data)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
target
processinginstructionGetTarget (XML Java) The "getTarget()" method returns the target of the processing instruction. It is the first token following the markup that begins the processing instruction. Retrieve the ProcessingInstruction node located immediately after the prolog. Create a nodelist of the child nodes of this document. Invoke the "getTarget()" method on the first child in the list. This should return the target of the ProcessingInstruction.

Interface Text

nodeTextNodeAttribute (XML Java) The "getAttributes()" method invoked on a Text Node returns null. Retrieve the Text node from the last child of the first employee and invoke the "getAttributes()" method on the Text Node. It should return null.
textWithNoMarkup (XML Java) If there is not any markup inside an Element or Attr node content, then the text is contained in a single object implementing the Text interface that is the only child of the element. Retrieve the textual data from the second child of the third employee. That Text node contains a block of multiple text lines without markup, so they should be treated as a single Text node. The "getNodeValue()" method should contain the combination of the two lines.
MethodTests
splitText
textIndexSizeErrNegativeOffset (XML Java) The "splitText(offset)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is negative. Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The desired exception should be raised since the offset is a negative number.
textIndexSizeErrOffsetOutOfBounds (XML Java) The "splitText(offset)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater than the number of characters in the Text node. Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The desired exception should be raised since the offset is a greater than the number of characters in the Text node.
textSplitTextFour (XML Java) The "splitText(offset)" method returns the new Text node. Retrieve the textual data from the last child of the first employee and invoke the "splitText(offset)" method. The method should return the new Text node. The offset value used for this test is 30. The "getNodeValue()" method is called to check that the new node now contains the characters at and after position 30. (Starting count at 0)
textSplitTextNoModificationAllowedErr (XML Java) The "splitText(offset)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the element content of the FIRST Text Node of the entity reference and execute the "splitText(offset)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
textSplitTextNoModificationAllowedErrEE (XML Java) The "splitText(offset)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Create an ent3 reference and execute the "splitText(offset)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
textSplitTextOne (XML Java) The "splitText(offset)" method breaks the Text node into two Text nodes at the specified offset keeping each node as siblings in the tree. Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The method splits the Text node into two new sibling Text nodes keeping both of them in the tree. This test checks the "nextSibling()" method of the original node to ensure that the two nodes are indeed siblings.
textSplitTextThree (XML Java) After the "splitText(offset)" method breaks the Text node into two Text nodes, the new Text node contains all the content at and after the offset point. Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The new Text node should contain all the content at and after the offset point. The "getNodeValue()" method is called to check that the new node now contains the characters at and after position seven. (Starting count at 0)
textSplitTextTwo (XML Java) After the "splitText(offset)" method breaks the Text node into two Text nodes, the original node contains all the content up to the offset point. Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The original Text node should contain all the content up to the offset point. The "getNodeValue()" method is called to check that the original node now contains the first five characters.
TestSubjects
http://www.w3.org/2001/DOM-Test-Suite/level1/core/alltests (XML Java)

No subjects defined for test

http://www.w3.org/2001/DOM-Test-Suite/level1/core/ (XML Java)

No subjects defined for test

attrCreateDocumentFragment (XML Java)
DocumentFragment
Document.createDocumentFragment method
Element.setAttribute method
attrCreateTextNode (XML Java)
Attr.value attribute
attrCreateTextNode2 (XML Java)
Node.nodeValue attribute
attrDefaultValue (XML Java)
Node.attributes attribute
NamedNodeMap.getNamedItem method
attrEffectiveValue (XML Java)
Node.attributes attribute
NamedNodeMap.getNamedItem method
attrEntityReplacement (XML Java)
Attr.value attribute
attrName (XML Java)
Node.nodeName attribute
Attr.name attribute
attrNextSiblingNull (XML Java)
Node.nextSibling attribute
Attr
attrNotSpecifiedValue (XML Java)
Attr.specified attribute
attrParentNodeNull (XML Java)
Node.parentNode attribute
Attr
attrPreviousSiblingNull (XML Java)
Node.previousSibling attribute
Attr
attrSetValueNoModificationAllowedErr (XML Java)
Attr.value attribute
attrSetValueNoModificationAllowedErrEE (XML Java)
Attr.value attribute
attrSpecifiedValue (XML Java)
Attr.specified attribute
attrSpecifiedValueChanged (XML Java)
Attr.specified attribute
attrSpecifiedValueRemove (XML Java)
Element.removeAttribute method
cdataSectionGetValue (XML Java)
CharacterData.data attribute
cdataSectionNormalize (XML Java)
Element.normalize method
characterdataAppendData (XML Java)
CharacterData.data attribute
CharacterData.appendData method
characterdataAppendDataGetData (XML Java)
CharacterData.data attribute
CharacterData.appendData method
characterdataAppendDataNoModificationAllowedErr (XML Java)
CharacterData.appendData method
NO_MODIFICATION_ALLOWED_ERR
characterdataAppendDataNoModificationAllowedErrEE (XML Java)
CharacterData.appendData method
NO_MODIFICATION_ALLOWED_ERR
characterdataDeleteDataBeginning (XML Java)
CharacterData.deleteData method
characterdataDeleteDataEnd (XML Java)
CharacterData.data attribute
CharacterData.deleteData method
characterdataDeleteDataEnd (XML Java)
Node.attributes attribute
Attr
characterdataDeleteDataExceedsLength (XML Java)
CharacterData.data attribute
CharacterData.deleteData method
characterdataDeleteDataGetLengthAndData (XML Java)
CharacterData.data attribute
CharacterData.length attribute
CharacterData.deleteData method
characterdataDeleteDataMiddle (XML Java)
CharacterData.data attribute
CharacterData.deleteData method
characterdataDeleteDataNoModificationAllowedErr (XML Java)
CharacterData.deleteData method
NO_MODIFICATION_ALLOWED_ERR
characterdataDeleteDataNoModificationAllowedErrEE (XML Java)
CharacterData.deleteData method
NO_MODIFICATION_ALLOWED_ERR
characterdataGetData (XML Java)
CharacterData.data attribute
characterdataGetLength (XML Java)
CharacterData.data attribute
CharacterData.length attribute
characterdataIndexSizeErrDeleteDataCountNegative (XML Java)
CharacterData.substringData method
INDEX_SIZE_ERR
characterdataIndexSizeErrDeleteDataOffsetGreater (XML Java)
CharacterData.deleteData method
INDEX_SIZE_ERR
characterdataIndexSizeErrDeleteDataOffsetNegative (XML Java)
CharacterData.deleteData method
INDEX_SIZE_ERR
characterdataIndexSizeErrInsertDataOffsetGreater (XML Java)
CharacterData.deleteData method
INDEX_SIZE_ERR
characterdataIndexSizeErrInsertDataOffsetNegative (XML Java)
CharacterData.replaceData method
INDEX_SIZE_ERR
characterdataIndexSizeErrReplaceDataCountNegative (XML Java)
CharacterData.substringData method
INDEX_SIZE_ERR
characterdataIndexSizeErrReplaceDataOffsetGreater (XML Java)
CharacterData.deleteData method
INDEX_SIZE_ERR
characterdataIndexSizeErrReplaceDataOffsetNegative (XML Java)
CharacterData.replaceData method
INDEX_SIZE_ERR
characterdataIndexSizeErrSubstringCountNegative (XML Java)
CharacterData.substringData method
INDEX_SIZE_ERR
characterdataIndexSizeErrSubstringNegativeOffset (XML Java)
CharacterData.substringData method
INDEX_SIZE_ERR
characterdataIndexSizeErrSubstringOffsetGreater (XML Java)
CharacterData.substringData method
INDEX_SIZE_ERR
characterdataInsertDataBeginning (XML Java)
CharacterData.insertData method
characterdataInsertDataEnd (XML Java)
CharacterData.data attribute
CharacterData.insertData method
characterdataInsertDataMiddle (XML Java)
CharacterData.data attribute
CharacterData.insertData method
characterdataInsertDataNoModificationAllowedErr (XML Java)
CharacterData.insertData method
NO_MODIFICATION_ALLOWED_ERR
characterdataInsertDataNoModificationAllowedErrEE (XML Java)
CharacterData.insertData method
NO_MODIFICATION_ALLOWED_ERR
characterdataReplaceDataBeginning (XML Java)
CharacterData.replaceData method
characterdataReplaceDataEnd (XML Java)
CharacterData.data attribute
CharacterData.replaceData method
characterdataReplaceDataExceedsLengthOfArg (XML Java)
CharacterData.data attribute
CharacterData.replaceData method
characterdataReplaceDataExceedsLengthOfData (XML Java)
CharacterData.data attribute
CharacterData.replaceData method
characterdataReplaceDataMiddle (XML Java)
CharacterData.data attribute
CharacterData.replaceData method
characterdataReplaceDataNoModificationAllowedErr (XML Java)
CharacterData.replaceData method
NO_MODIFICATION_ALLOWED_ERR
characterdataReplaceDataNoModificationAllowedErrEE (XML Java)
CharacterData.replaceData method
NO_MODIFICATION_ALLOWED_ERR
characterdataSetDataNoModificationAllowedErr (XML Java)
CharacterData.data attribute
NO_MODIFICATION_ALLOWED_ERR
characterdataSetDataNoModificationAllowedErrEE (XML Java)
CharacterData.data attribute
NO_MODIFICATION_ALLOWED_ERR
characterdataSetNodeValue (XML Java)
CharacterData.data attribute
characterdataSubStringExceedsValue (XML Java)
CharacterData.substringData method
characterdataSubStringValue (XML Java)
CharacterData.substringData method
commentGetComment (XML Java)
Document.createComment method
Node.nodeName attribute
Node.nodeValue attribute
Node.nodeType attribute
documentCreateAttribute (XML Java)
Document.createAttribute method
documentCreateCDATASection (XML Java)
Document.createCDATASection method
documentCreateComment (XML Java)
Document.createComment method
documentCreateDocumentFragment (XML Java)
Document.createDocumentFragment method
documentCreateElement (XML Java)
Document.createElement method
documentCreateElementCaseSensitive (XML Java)
Document.createElement method
documentCreateElementDefaultAttr (XML Java)
Document.createElement method
documentCreateEntityReference (XML Java)
Document.createEntityReference method
Node.nodeValue attribute
documentCreateEntityReferenceKnown (XML Java)
Document.createEntityReference method
documentCreateProcessingInstruction (XML Java)
Document.createProcessingInstruction method
documentCreateTextNode (XML Java)
Document.createTextNode method
documentGetDocType (XML Java)
Document.doctype attribute
Node.nodeValue attribute
documentGetDocTypeNoDTD (XML Java)
Document.doctype attribute
documentGetElementsByTagNameLength (XML Java)
Document.getElementsByTagName method
documentGetElementsByTagNameTotalLength (XML Java)
Document.getElementsByTagName method
documentGetElementsByTagNameValue (XML Java)
Document.getElementsByTagName method
documentGetImplementation (XML Java)
Document.implementation attribute
documentGetRootNode (XML Java)
Document.documentElement attribute
documentInvalidCharacterExceptionCreateAttribute (XML Java)
Document.createAttribute method
INVALID_CHARACTER_ERR
documentInvalidCharacterExceptionCreateElement (XML Java)
Document.createElement method
INVALID_CHARACTER_ERR
documentInvalidCharacterExceptionCreateEntRef (XML Java)
Document.createEntityReference method
INVALID_CHARACTER_ERR
documentInvalidCharacterExceptionCreatePI (XML Java)
Document.createProcessingInstruction method
INVALID_CHARACTER_ERR
documenttypeGetDocType (XML Java)
Document.doctype attribute
DocumentType.name attribute
documenttypeGetEntities (XML Java)
DocumentType.entities attribute
documenttypeGetEntitiesLength (XML Java)
DocumentType.entities attribute
documenttypeGetEntitiesType (XML Java)
DocumentType.entities attribute
documenttypeGetNotations (XML Java)
DocumentType.notations attribute
documenttypeGetNotationsType (XML Java)
DocumentType.notations attribute
domimplementationFeatureNoVersion (XML Java)
DOMImplementation.hasFeature method
domimplementationFeatureNull (XML Java)
DOMImplementation.hasFeature method
domimplementationFeaturexml (XML Java)
DOMImplementation.hasFeature method
elementAddNewAttribute (XML Java)
Element.setAttribute method
elementAssociatedAttribute (XML Java)
Node.attributes attribute
elementChangeAttributeValue (XML Java)
Element.setAttribute method
elementCreateNewAttribute (XML Java)
Element.setAttributeNode method
elementGetAttributeNode (XML Java)
Element.getAttributeNode method
elementGetAttributeNodeNull (XML Java)
Element.getAttributeNode method
elementGetElementEmpty (XML Java)
Element.getAttribute method
elementGetElementsByTagName (XML Java)
Element.getElementsByTagName method
elementGetElementsByTagName (XML Java)
Element.getElementsByTagName method
elementGetElementsByTagName (XML Java)
Element.getElementsByTagName method
elementGetElementsByTagNamesSpecialValue (XML Java)
Element.getElementsByTagName method
elementGetTagName (XML Java)
Element.tagName attribute
elementInUseAttributeErr (XML Java)
Element.setAttributeNode method
INUSE_ATTRIBUTE_ERR
elementInvalidCharacterException (XML Java)
Element.setAttribute method
INVALID_CHARACTER_ERR
elementNormalize (XML Java)
Element.normalize method
elementNotFoundErr (XML Java)
Element.removeAttributeNode method
elementRemoveAttribute (XML Java)
Element.removeAttribute method
elementRemoveAttributeAfterCreate (XML Java)
Element.removeAttributeNode method
elementRemoveAttributeNode (XML Java)
Element.removeAttributeNode method
elementRemoveAttributeNodeNoModificationAllowedErr (XML Java)
Element.removeAttributeNode method
NO_MODIFICATION_ALLOWED_ERR
elementRemoveAttributeNodeNoModificationAllowedErrEE (XML Java)
Element.removeAttributeNode method
NO_MODIFICATION_ALLOWED_ERR
elementRemoveAttributeNoModificationAllowedErr (XML Java)
Element.removeAttribute method
NO_MODIFICATION_ALLOWED_ERR
elementRemoveAttributeNoModificationAllowedErr (XML Java)
Element.removeAttribute method
NO_MODIFICATION_ALLOWED_ERR
elementRemoveAttributeRestoreDefaultValue (XML Java)
Element.removeAttributeNode method
elementReplaceAttributeWithSelf (XML Java)
Element.setAttributeNode method
elementReplaceExistingAttribute (XML Java)

No subjects defined for test

elementReplaceExistingAttributeGeValue (XML Java)
Element.setAttributeNode method
elementRetrieveAllAttributes (XML Java)
Node.attributes attribute
elementRetrieveAttrValue (XML Java)
Element.getAttribute method
elementRetrieveTagName (XML Java)
Node.nodeName attribute
Element.tagName attribute
elementSetAttributeNodeNoModificationAllowedErr (XML Java)
Element.setAttributeNode method
NO_MODIFICATION_ALLOWED_ERR
elementSetAttributeNodeNoModificationAllowedErr (XML Java)
Element.setAttributeNode method
NO_MODIFICATION_ALLOWED_ERR
elementSetAttributeNodeNull (XML Java)
Element.setAttributeNode method
elementSetAttributeNoModificationAllowedErr (XML Java)
Element.setAttribute method
NO_MODIFICATION_ALLOWED_ERR
elementSetAttributeNoModificationAllowedErr (XML Java)
Element.setAttribute method
NO_MODIFICATION_ALLOWED_ERR
elementWrongDocumentErr (XML Java)
Element.setAttributeNode method
WRONG_DOCUMENT_ERR
entityGetEntityName (XML Java)
Node.nodeName attribute
Entity
entityGetPublicId (XML Java)
Entity.publicId attribute
Entity.systemId attribute
Entity.notationName attribute
entityGetPublicIdNull (XML Java)
Entity.publicId attribute
namednodemapChildNodeRange (XML Java)
Node.attributes attribute
NamedNodeMap.item method
NamedNodeMap.length attribute
namednodemapGetNamedItem (XML Java)
NamedNodeMap.getNamedItem method
NamedNodeMap.item method
namedNodeMapInUseAttributeErr (XML Java)
NamedNodeMap.setNamedItem method
INUSE_ATTRIBUTE_ERR
namednodemapNotFoundErr (XML Java)
NamedNodeMap.removeNamedItem method
namednodemapNumberOfNodes (XML Java)
Node.attributes attribute
NamedNodeMap.length attribute
namednodemapRemoveNamedItem (XML Java)
NamedNodeMap.removeNamedItem method
NamedNodeMap.item method
namednodemapRemoveNamedItemGetValue (XML Java)
NamedNodeMap.removeNamedItem method
NamedNodeMap.item method
namednodemapRemoveNamedItemReturnNodeValue (XML Java)
NamedNodeMap.removeNamedItem method
NamedNodeMap.item method
namednodemapReturnAttrNode (XML Java)
Node.attributes attribute
NamedNodeMap.getNamedItem method
Attr
Attr.name attribute
namednodemapReturnFirstItem (XML Java)
NamedNodeMap.item method
namednodemapReturnLastItem (XML Java)
NamedNodeMap.item method
namednodemapReturnNull (XML Java)
NamedNodeMap.getNamedItem method
namednodemapSetNamedItem (XML Java)
NamedNodeMap.setNamedItem method
NamedNodeMap.item method
namednodemapSetNamedItemReturnValue (XML Java)
NamedNodeMap.setNamedItem method
NamedNodeMap.item method
namednodemapSetNamedItemThatExists (XML Java)
NamedNodeMap.setNamedItem method
NamedNodeMap.item method
namednodemapSetNamedItemWithNewValue (XML Java)
NamedNodeMap.setNamedItem method
NamedNodeMap.item method
namednodemapWrongDocumentErr (XML Java)
NamedNodeMap.setNamedItem method
WRONG_DOCUMENT_ERR
nodeAppendChild (XML Java)
Node.appendChild method
nodeAppendChildChildExists (XML Java)
Node.appendChild method
nodeAppendChildDocFragment (XML Java)
Node.appendChild method
nodeAppendChildGetNodeName (XML Java)
Node.nodeName attribute
Node.appendChild method
nodeAppendChildInvalidNodeType (XML Java)
Node.appendChild method
HIERARCHY_REQUEST_ERR
nodeAppendChildNewChildDiffDocument (XML Java)
Node.appendChild method
nodeAppendChildNodeAncestor (XML Java)
Node.appendChild method
HIERARCHY_REQUEST_ERR
nodeAppendChildNoModificationAllowedErr (XML Java)
Node.appendChild method
NO_MODIFICATION_ALLOWED_ERR
nodeAppendChildNoModificationAllowedErrEE (XML Java)
Node.appendChild method
NO_MODIFICATION_ALLOWED_ERR
nodeAttributeNodeName (XML Java)
Node.nodeName attribute
nodeAttributeNodeType (XML Java)
Node.nodeType attribute
nodeAttributeNodeValue (XML Java)
Node.nodeValue attribute
nodeCDATASectionNodeAttribute (XML Java)
Node.attributes attribute
CDATASection
nodeCDATASectionNodeName (XML Java)
Node.nodeName attribute
CDATASection
nodeCDATASectionNodeType (XML Java)
Node.nodeType attribute
CDATASection
nodeCDATASectionNodeValue (XML Java)
Node.nodeValue attribute
CDATASection
nodeChildNodes (XML Java)
Node.childNodes attribute
nodeChildNodesAppendChild (XML Java)
Node.childNodes attribute
Node.appendChild method
nodeChildNodesEmpty (XML Java)
Node.childNodes attribute
nodeCloneAttributesCopied (XML Java)
Node.attributes attribute
nodeCloneFalseNoCopyText (XML Java)
Node.cloneNode method
nodeCloneGetParentNull (XML Java)
Node.cloneNode method
nodeCloneNodeFalse (XML Java)
Node.cloneNode method
nodeCloneNodeTrue (XML Java)
Node.cloneNode method
nodeCloneTrueCopyText (XML Java)
Node.cloneNode method
nodeCommentNodeAttributes (XML Java)
Node.attributes attribute
Comment
nodeCommentNodeName (XML Java)
Node.nodeName attribute
Comment
nodeCommentNodeType (XML Java)
Node.nodeType attribute
Comment
nodeCommentNodeValue (XML Java)
Node.nodeValue attribute
Comment
nodeDocumentFragmentNodeName (XML Java)
DocumentFragment
Node.nodeName attribute
nodeDocumentFragmentNodeType (XML Java)
DocumentFragment
Node.nodeType attribute
nodeDocumentFragmentNodeValue (XML Java)
DocumentFragment
Node.nodeValue attribute
Node.attributes attribute
nodedocumentnodeattribute (XML Java)
Document
Node.attributes attribute
nodeDocumentNodeName (XML Java)
Document
Node.nodeName attribute
nodeDocumentNodeType (XML Java)
Document
Node.nodeType attribute
nodeDocumentNodeValue (XML Java)
Document
Node.nodeValue attribute
nodeDocumentTypeNodeName (XML Java)
Node.nodeName attribute
nodeDocumentTypeNodeType (XML Java)
Node.nodeType attribute
nodeDocumentTypeNodeValue (XML Java)

No subjects defined for test

nodeElementNodeAttributes (XML Java)
Node.attributes attribute
nodeElementNodeName (XML Java)
Node.nodeName attribute
nodeElementNodeType (XML Java)
Node.nodeType attribute
nodeElementNodeValue (XML Java)
Node.nodeValue attribute
nodeEntityNodeAttributes (XML Java)
Node.attributes attribute
nodeEntityNodeName (XML Java)
Node.nodeName attribute
nodeEntityNodeType (XML Java)
Node.nodeType attribute
nodeEntityNodeValue (XML Java)
Node.nodeValue attribute
nodeEntityReferenceNodeAttributes (XML Java)
Node.attributes attribute
nodeEntityReferenceNodeName (XML Java)
Node.nodeName attribute
nodeEntityReferenceNodeType (XML Java)
Node.nodeType attribute
nodeEntityReferenceNodeValue (XML Java)
Node.nodeValue attribute
nodeEntitySetNodeValue (XML Java)
Node.nodeValue attribute
Entity
nodeGetFirstChild (XML Java)
Node.firstChild attribute
nodeGetFirstChildNull (XML Java)
Node.firstChild attribute
nodeGetLastChild (XML Java)
Node.lastChild attribute
nodeGetLastChildNull (XML Java)
Node.lastChild attribute
nodeGetNextSibling (XML Java)
Node.nextSibling attribute
nodeGetNextSiblingNull (XML Java)
Node.nextSibling attribute
nodeGetOwnerDocument (XML Java)
Node.ownerDocument attribute
nodeGetOwnerDocumentNull (XML Java)
Node.ownerDocument attribute
nodeGetPreviousSibling (XML Java)
Node.previousSibling attribute
nodeGetPreviousSiblingNull (XML Java)
Node.previousSibling attribute
nodeHasChildNodes (XML Java)
Node.hasChildNodes method
nodeHasChildNodesFalse (XML Java)
Node.childNodes attribute
Node.hasChildNodes method
nodeInsertBefore (XML Java)
Node.insertBefore method
nodeInsertBeforeDocFragment (XML Java)
Node.insertBefore method
nodeInsertBeforeInvalidNodeType (XML Java)
Node.insertBefore method
HIERARCHY_REQUEST_ERR
nodeInsertBeforeNewChildDiffDocument (XML Java)
Node.insertBefore method
WRONG_DOCUMENT_ERR
nodeInsertBeforeNewChildExists (XML Java)
Node.insertBefore method
nodeInsertBeforeNodeAncestor (XML Java)
Node.insertBefore method
HIERARCHY_REQUEST_ERR
nodeInsertBeforeNodeName (XML Java)
Node.nodeName attribute
Node.insertBefore method
nodeInsertBeforeNoModificationAllowedErr (XML Java)
Node.insertBefore method
NO_MODIFICATION_ALLOWED_ERR
nodeInsertBeforeNoModificationAllowedErrEE (XML Java)
Node.insertBefore method
NO_MODIFICATION_ALLOWED_ERR
nodeInsertBeforeRefChildNonexistent (XML Java)
Node.insertBefore method
NOT_FOUND_ERR
nodeInsertBeforeRefChildNull (XML Java)
Node.insertBefore method
nodelistIndexEqualZero (XML Java)
NodeList.item method
nodelistIndexGetLength (XML Java)
NodeList.length attribute
nodelistIndexGetLengthOfEmptyList (XML Java)
NodeList.length attribute
nodelistIndexNotZero (XML Java)
NodeList.item method
nodelistReturnFirstItem (XML Java)
NodeList.item method
nodelistReturnLastItem (XML Java)
NodeList.item method
nodelistTraverseList (XML Java)
NodeList.item method
NodeList.length attribute
nodeNotationNodeAttributes (XML Java)
Node.attributes attribute
nodeNotationNodeName (XML Java)
Node.nodeName attribute
nodeNotationNodeType (XML Java)
Node.nodeType attribute
nodeNotationNodeValue (XML Java)
Node.nodeValue attribute
nodeParentNode (XML Java)
Node.parentNode attribute
nodeParentNodeNull (XML Java)
Node.parentNode attribute
nodeProcessingInstructionNodeAttributes (XML Java)
Node.attributes attribute
nodeProcessingInstructionNodeName (XML Java)
Node.nodeName attribute
nodeProcessingInstructionNodeType (XML Java)
Node.nodeType attribute
nodeProcessingInstructionNodeValue (XML Java)
Node.nodeValue attribute
nodeProcessingInstructionSetNodeValue (XML Java)
Node.nodeValue attribute
ProcessingInstruction
ProcessingInstruction.data attribute
nodeRemoveChild (XML Java)
Node.removeChild method
nodeRemoveChildGetNodeName (XML Java)
Node.nodeName attribute
Node.removeChild method
nodeRemoveChildNode (XML Java)
Node.removeChild method
nodeRemoveChildNoModificationAllowedErr (XML Java)
Node.removeChild method
NO_MODIFICATION_ALLOWED_ERR
nodeRemoveChildNoModificationAllowedErrEE (XML Java)
Node.removeChild method
NO_MODIFICATION_ALLOWED_ERR
nodeRemoveChildOldChildNonexistent (XML Java)
Node.removeChild method
NOT_FOUND_ERR
nodeReplaceChild (XML Java)
Node.replaceChild method
nodeReplaceChildInvalidNodeType (XML Java)
Node.replaceChild method
HIERARCHY_REQUEST_ERR
nodeReplaceChildNewChildDiffDocument (XML Java)
Node.replaceChild method
NOT_FOUND_ERR
nodeReplaceChildNewChildExists (XML Java)
Node.replaceChild method
nodeReplaceChildNodeAncestor (XML Java)
Node.replaceChild method
HIERARCHY_REQUEST_ERR
nodeReplaceChildNodeName (XML Java)
Node.nodeName attribute
Node.replaceChild method
nodeReplaceChildNoModificationAllowedErr (XML Java)
Node.replaceChild method
NO_MODIFICATION_ALLOWED_ERR
nodeReplaceChildNoModificationAllowedErrEE (XML Java)
Node.replaceChild method
NO_MODIFICATION_ALLOWED_ERR
nodeReplaceChildOldChildNonexistent (XML Java)
Node.replaceChild method
NOT_FOUND_ERR
nodeSetNodeValueNoModificationAllowedErr (XML Java)
Node.nodeValue attribute
NO_MODIFICATION_ALLOWED_ERR
nodeSetNodeValueNoModificationAllowedErrEE (XML Java)
Node.nodeValue attribute
NO_MODIFICATION_ALLOWED_ERR
nodeTextNodeAttribute (XML Java)
Node.attributes attribute
Text
nodeTextNodeName (XML Java)
Node.nodeName attribute
nodeTextNodeType (XML Java)
Node.nodeType attribute
nodeTextNodeValue (XML Java)
Node.nodeValue attribute
nodevalue01 (XML Java)
Document
Node.nodeValue attribute
nodevalue02 (XML Java)
Node.nodeValue attribute
Comment
nodevalue03 (XML Java)
Node.nodeValue attribute
EntityReference
nodevalue04 (XML Java)
Document.doctype attribute
Node.nodeValue attribute
nodevalue05 (XML Java)
DocumentFragment
Node.nodeValue attribute
nodevalue06 (XML Java)
Document
Node.nodeValue attribute
nodevalue07 (XML Java)
Node.nodeValue attribute
Entity
nodevalue08 (XML Java)
Node.nodeValue attribute
Notation
nodevalue09 (XML Java)
Node.nodeValue attribute
ProcessingInstruction
notationGetNotationName (XML Java)
Node.nodeName attribute
Notation
notationGetPublicId (XML Java)
Notation.publicId attribute
notationGetPublicIdNull (XML Java)
Notation.publicId attribute
notationGetSystemId (XML Java)
Notation.systemId attribute
notationGetSystemIdNull (XML Java)
Notation.systemId attribute
processinginstructionGetData (XML Java)
ProcessingInstruction.data attribute
processinginstructionGetTarget (XML Java)
ProcessingInstruction.target attribute
processinginstructionSetDataNoModificationAllowedErr (XML Java)
ProcessingInstruction.data attribute
NO_MODIFICATION_ALLOWED_ERR
processinginstructionSetDataNoModificationAllowedErrEE (XML Java)
ProcessingInstruction.data attribute
NO_MODIFICATION_ALLOWED_ERR
textIndexSizeErrNegativeOffset (XML Java)
Text.splitText method
INDEX_SIZE_ERR
textIndexSizeErrOffsetOutOfBounds (XML Java)
Text.splitText method
INDEX_SIZE_ERR
textParseIntoListOfElements (XML Java)
Node.childNodes attribute
Element
EntityReference
textSplitTextFour (XML Java)
Text.splitText method
textSplitTextNoModificationAllowedErr (XML Java)
Text.splitText method
NO_MODIFICATION_ALLOWED_ERR
textSplitTextNoModificationAllowedErrEE (XML Java)
Text.splitText method
NO_MODIFICATION_ALLOWED_ERR
textSplitTextOne (XML Java)
Text.splitText method
textSplitTextThree (XML Java)
Text.splitText method
textSplitTextTwo (XML Java)
Text.splitText method
textWithNoMarkup (XML Java)
Node.nodeValue attribute
Text

Tests in this table are released under the W3C Software Copyright Notice and License:
Copyright (c) 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. This program is distributed under the W3C's Software Intellectual Property License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See W3C License http://www.w3.org/Consortium/Legal/ for more details.