home *** CD-ROM | disk | FTP | other *** search
- package com.sun.xml.tree;
-
- import java.io.IOException;
- import java.io.Writer;
- import org.w3c.dom.Node;
- import org.w3c.dom.ProcessingInstruction;
-
- final class PINode extends NodeBase implements ProcessingInstruction {
- private String target;
- private char[] data;
-
- public PINode() {
- }
-
- public PINode(String var1, String var2) {
- this.data = var2.toCharArray();
- this.target = var1;
- }
-
- PINode(String var1, char[] var2, int var3, int var4) {
- this.data = new char[var4];
- System.arraycopy(var2, var3, this.data, 0, var4);
- this.target = var1;
- }
-
- public Node cloneNode(boolean var1) {
- PINode var2 = new PINode(this.target, this.data, 0, this.data.length);
- ((NodeBase)var2).setOwnerDocument((XmlDocument)((NodeBase)this).getOwnerDocument());
- return var2;
- }
-
- public String getData() {
- return new String(this.data);
- }
-
- public String getNodeName() {
- return this.target;
- }
-
- public short getNodeType() {
- return 7;
- }
-
- public String getNodeValue() {
- return this.getData();
- }
-
- public String getTarget() {
- return this.target;
- }
-
- public void setData(String var1) {
- if (((NodeBase)this).isReadonly()) {
- throw new DomEx((short)7);
- } else {
- this.data = var1.toCharArray();
- }
- }
-
- public void setNodeValue(String var1) {
- this.setData(var1);
- }
-
- public void setTarget(String var1) {
- this.target = var1;
- }
-
- public void writeXml(XmlWriteContext var1) throws IOException {
- Writer var2 = var1.getWriter();
- var2.write("<?");
- var2.write(this.target);
- if (this.data != null) {
- var2.write(32);
- var2.write(this.data);
- }
-
- var2.write("?>");
- }
- }
-