01: /*
02: * @(#)DOMProcessingInstructionImpl.java 1.11 2000/08/16
03: *
04: */
05:
06: package org.w3c.tidy;
07:
08: import org.w3c.dom.DOMException;
09:
10: /**
11: *
12: * DOMProcessingInstructionImpl
13: *
14: * (c) 1998-2000 (W3C) MIT, INRIA, Keio University
15: * See Tidy.java for the copyright notice.
16: * Derived from <a href="http://www.w3.org/People/Raggett/tidy">
17: * HTML Tidy Release 4 Aug 2000</a>
18: *
19: * @author Dave Raggett <dsr@w3.org>
20: * @author Andy Quick <ac.quick@sympatico.ca> (translation to Java)
21: * @version 1.7, 1999/12/06 Tidy Release 30 Nov 1999
22: * @version 1.8, 2000/01/22 Tidy Release 13 Jan 2000
23: * @version 1.9, 2000/06/03 Tidy Release 30 Apr 2000
24: * @version 1.10, 2000/07/22 Tidy Release 8 Jul 2000
25: * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000
26: */
27:
28: public class DOMProcessingInstructionImpl extends DOMNodeImpl implements
29: org.w3c.dom.ProcessingInstruction {
30:
31: protected DOMProcessingInstructionImpl(Node adaptee) {
32: super (adaptee);
33: }
34:
35: /* --------------------- DOM ---------------------------- */
36:
37: /**
38: * @see org.w3c.dom.Node#getNodeType
39: */
40: public short getNodeType() {
41: return org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE;
42: }
43:
44: /**
45: * @see org.w3c.dom.ProcessingInstruction#getTarget
46: */
47: public String getTarget() {
48: // TODO
49: return null;
50: }
51:
52: /**
53: * @see org.w3c.dom.ProcessingInstruction#getData
54: */
55: public String getData() {
56: return getNodeValue();
57: }
58:
59: /**
60: * @see org.w3c.dom.ProcessingInstruction#setData
61: */
62: public void setData(String data) throws DOMException {
63: // NOT SUPPORTED
64: throw new DOMExceptionImpl(
65: DOMException.NO_MODIFICATION_ALLOWED_ERR,
66: "Not supported");
67: }
68:
69: }
|