1 16 package com.google.gwt.xml.client.impl; 17 18 import com.google.gwt.core.client.JavaScriptException; 19 import com.google.gwt.core.client.JavaScriptObject; 20 import com.google.gwt.xml.client.DOMException; 21 import com.google.gwt.xml.client.ProcessingInstruction; 22 23 26 class ProcessingInstructionImpl extends NodeImpl implements 27 ProcessingInstruction { 28 29 protected ProcessingInstructionImpl(JavaScriptObject o) { 30 super(o); 31 } 32 33 37 public String getData() { 38 return XMLParserImpl.getData(this.getJsObject()); 39 } 40 41 45 public String getTarget() { 46 return XMLParserImpl.getTarget(this.getJsObject()); 47 } 48 49 53 public void setData(String data) { 54 try { 55 XMLParserImpl.setData(this.getJsObject(), data); 56 } catch (JavaScriptException e) { 57 throw new DOMNodeException(DOMException.INVALID_CHARACTER_ERR, e, this); 58 } 59 } 60 61 public String toString() { 62 StringBuffer b = new StringBuffer ("<?"); 63 b.append(getNodeName()); 64 b.append(" "); 65 b.append(getData()); 66 b.append("?>"); 67 return b.toString(); 68 } 69 } 70 | Popular Tags |