1 29 30 package com.caucho.quercus.lib.dom; 31 32 import com.caucho.quercus.annotation.Optional; 33 import com.caucho.quercus.env.Env; 34 35 import org.w3c.dom.ProcessingInstruction ; 36 37 public class DOMProcessingInstruction 38 extends DOMNode<ProcessingInstruction > 39 { 40 public static DOMProcessingInstruction __construct(Env env, String name, @Optional String data) 41 { 42 DOMProcessingInstruction pi = getImpl(env).createProcessingInstruction(name); 43 44 if (data != null && data.length() > 0) 45 pi.setData(data); 46 47 return pi; 48 } 49 50 DOMProcessingInstruction(DOMImplementation impl, ProcessingInstruction delegate) 51 { 52 super(impl, delegate); 53 } 54 55 public String getData() 56 { 57 return _delegate.getData(); 58 } 59 60 public String getTarget() 61 { 62 return _delegate.getTarget(); 63 } 64 65 public void setData(String data) 66 throws DOMException 67 { 68 try { 69 _delegate.setData(data); 70 } 71 catch (org.w3c.dom.DOMException ex) { 72 throw wrap(ex); 73 } 74 } 75 } 76 | Popular Tags |