Main Page Packages Class Hierarchy Compound List File List Compound Members

# documentcreateprocessinginstruction Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

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.

Author:
  NIST , Mary Brady , Curt Arnold

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core# , http://lists.w3.org/Archives/Public/www-dom-ts/2001Apr/0020.html , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-135944439

Definition at line 50 of file documentcreateprocessinginstruction.java.

## Constructor & Destructor Documentation

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

| Definition at line 52 of file documentcreateprocessinginstruction.java.
    00053  {
    00054       super(factory);
    00055
    00056    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 74 of file documentcreateprocessinginstruction.java.
    00074                                 {
    00075       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentcreateprocessinginstruction";
    00076    }

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

| Definition at line 77 of file documentcreateprocessinginstruction.java. References DOMTestCase::doMain().
    00077                                           {
    00078         DOMTestCase.doMain(documentcreateprocessinginstruction.class,args);
    00079    }

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

| Reimplemented from DOMTestCase. Definition at line 58 of file documentcreateprocessinginstruction.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00058                                                     {
    00059       Document doc;
    00060       ProcessingInstruction newPINode;
    00061       String piValue;
    00062       String piName;
    00063       int piType;
    00064       doc = load("staff");
    00065       newPINode = doc.createProcessingInstruction("TESTPI","This is a new PI node");
    00066       piName = newPINode.getNodeName();
    00067       assertEquals("name","TESTPI",piName);
    00068       piValue = newPINode.getNodeValue();
    00069       assertEquals("value","This is a new PI node",piValue);
    00070       piType = (int)newPINode.getNodeType();
    00071       assertEquals("type",7,piType);
    00072
    00073    }

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

- documentcreateprocessinginstruction.java