KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > dom > PIOverNodeInfo


1 package net.sf.saxon.dom;
2
3 import org.w3c.dom.DOMException JavaDoc;
4 import org.w3c.dom.ProcessingInstruction JavaDoc;
5
6 /**
7  * This class is an implementation of the DOM ProcessingInstruction interface that wraps a Saxon NodeInfo
8  * representation of a text or comment node.
9  */

10
11 public class PIOverNodeInfo extends NodeOverNodeInfo implements ProcessingInstruction JavaDoc {
12
13     /**
14      * The target of this processing instruction. XML defines this as being
15      * the first token following the markup that begins the processing
16      * instruction.
17      */

18     public String JavaDoc getTarget() {
19         return node.getLocalPart();
20     }
21
22     /**
23      * The content of this processing instruction. This is from the first non
24      * white space character after the target to the character immediately
25      * preceding the <code>?&gt;</code>.
26      */

27     public String JavaDoc getData() {
28         return node.getStringValue();
29     }
30
31     /**
32      * The content of this processing instruction. This is from the first non
33      * white space character after the target to the character immediately
34      * preceding the <code>?&gt;</code>.
35      *
36      * @throws org.w3c.dom.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
37      */

38     public void setData(String JavaDoc data) throws DOMException JavaDoc {
39         disallowUpdate();
40     }
41 }
42
43 //
44
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
45
// you may not use this file except in compliance with the License. You may obtain a copy of the
46
// License at http://www.mozilla.org/MPL/
47
//
48
// Software distributed under the License is distributed on an "AS IS" basis,
49
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
50
// See the License for the specific language governing rights and limitations under the License.
51
//
52
// The Original Code is: all this file.
53
//
54
// The Initial Developer of the Original Code is Michael H. Kay.
55
//
56
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
57
//
58
// Contributor(s): none.
59
//
Popular Tags