Main Page Packages Class Hierarchy Compound List File List Compound Members

# documentcreateattribute Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| documentcreateattribute (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

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.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198

Definition at line 46 of file documentcreateattribute.java.

## Constructor & Destructor Documentation

documentcreateattribute::documentcreateattribute | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 48 of file documentcreateattribute.java.
    00049  {
    00050       super(factory);
    00051
    00052    }

## Member Function Documentation

String documentcreateattribute::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 70 of file documentcreateattribute.java.
    00070                                 {
    00071       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentcreateattribute";
    00072    }

void documentcreateattribute::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 73 of file documentcreateattribute.java. References DOMTestCase::doMain().
    00073                                           {
    00074         DOMTestCase.doMain(documentcreateattribute.class,args);
    00075    }

void documentcreateattribute::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 54 of file documentcreateattribute.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00054                                                     {
    00055       Document doc;
    00056       Attr newAttrNode;
    00057       String attrValue;
    00058       String attrName;
    00059       int attrType;
    00060       doc = load("staff");
    00061       newAttrNode = doc.createAttribute("district");
    00062       attrValue = newAttrNode.getNodeValue();
    00063       assertEquals("value","",attrValue);
    00064       attrName = newAttrNode.getNodeName();
    00065       assertEquals("name","district",attrName);
    00066       attrType = (int)newAttrNode.getNodeType();
    00067       assertEquals("type",2,attrType);
    00068
    00069    }

The documentation for this class was generated from the following file:

- documentcreateattribute.java