1 7 8 package org.dom4j; 9 10 import java.io.IOException ; 11 import java.io.Writer ; 12 import java.util.List ; 13 14 35 public interface Node extends Cloneable { 36 38 39 short ANY_NODE = 0; 40 41 42 short ELEMENT_NODE = 1; 43 44 45 short ATTRIBUTE_NODE = 2; 46 47 48 short TEXT_NODE = 3; 49 50 51 short CDATA_SECTION_NODE = 4; 52 53 54 short ENTITY_REFERENCE_NODE = 5; 55 56 57 58 60 short PROCESSING_INSTRUCTION_NODE = 7; 61 62 63 short COMMENT_NODE = 8; 64 65 66 short DOCUMENT_NODE = 9; 67 68 69 short DOCUMENT_TYPE_NODE = 10; 70 71 74 75 76 short NAMESPACE_NODE = 13; 78 79 80 short UNKNOWN_NODE = 14; 81 82 83 short MAX_NODE_TYPE = 14; 84 85 101 boolean supportsParent(); 102 103 118 Element getParent(); 119 120 135 void setParent(Element parent); 136 137 153 Document getDocument(); 154 155 170 void setDocument(Document document); 171 172 183 boolean isReadOnly(); 184 185 195 boolean hasContent(); 196 197 206 String getName(); 207 208 217 void setName(String name); 218 219 226 String getText(); 227 228 237 void setText(String text); 238 239 247 String getStringValue(); 248 249 259 String getPath(); 260 261 276 String getPath(Element context); 277 278 289 String getUniquePath(); 290 291 308 String getUniquePath(Element context); 309 310 317 String asXML(); 318 319 333 void write(Writer writer) throws IOException ; 334 335 343 short getNodeType(); 344 345 351 String getNodeTypeName(); 352 353 369 Node detach(); 370 371 384 List selectNodes(String xpathExpression); 385 386 402 Object selectObject(String xpathExpression); 403 404 420 List selectNodes(String xpathExpression, String comparisonXPathExpression); 421 422 441 List selectNodes(String xpathExpression, String comparisonXPathExpression, 442 boolean removeDuplicates); 443 444 455 Node selectSingleNode(String xpathExpression); 456 457 471 String valueOf(String xpathExpression); 472 473 486 Number numberValueOf(String xpathExpression); 487 488 507 boolean matches(String xpathExpression); 508 509 524 XPath createXPath(String xpathExpression) throws InvalidXPathException; 525 526 541 Node asXPathResult(Element parent); 542 543 551 void accept(Visitor visitor); 552 553 561 Object clone(); 562 } 563 564 600 | Popular Tags |