org.w3c.tidy
Class Node
java.lang.Object
|
+--org.w3c.tidy.Node
- public class Node
- extends java.lang.Object
Node
(c) 1998-2000 (W3C) MIT, INRIA, Keio University
See Tidy.java for the copyright notice.
Derived from
HTML Tidy Release 4 Aug 2000
- Version:
- 1.0, 1999/05/22
- Author:
- Dave Raggett , Andy Quick (translation to Java)
Constructor Summary |
Node()
|
Node(short type,
byte[] textarray,
int start,
int end)
|
Node(short type,
byte[] textarray,
int start,
int end,
java.lang.String element,
TagTable tt)
|
Method Summary |
void |
addAttribute(java.lang.String name,
java.lang.String value)
|
static void |
addClass(Node node,
java.lang.String classname)
|
void |
checkAttributes(Lexer lexer)
|
boolean |
checkNodeIntegrity()
|
void |
checkUniqueAttributes(Lexer lexer)
|
protected java.lang.Object |
clone()
|
protected Node |
cloneNode(boolean deep)
|
static void |
coerceNode(Lexer lexer,
Node node,
Dict tag)
|
void |
discardDocType()
|
static Node |
discardElement(Node element)
|
Node |
findBody(TagTable tt)
|
Node |
findDocType()
|
Node |
findHEAD(TagTable tt)
|
Node |
findHTML(TagTable tt)
|
static void |
fixEmptyRow(Lexer lexer,
Node row)
|
protected org.w3c.dom.Node |
getAdapter()
|
AttVal |
getAttrByName(java.lang.String name)
|
boolean |
hasOneChild()
|
static void |
insertDocType(Lexer lexer,
Node element,
Node doctype)
|
static boolean |
insertMisc(Node element,
Node node)
|
static void |
insertNodeAfterElement(Node element,
Node node)
|
static void |
insertNodeAsParent(Node element,
Node node)
|
static void |
insertNodeAtEnd(Node element,
Node node)
|
static void |
insertNodeAtStart(Node element,
Node node)
|
static void |
insertNodeBeforeElement(Node element,
Node node)
|
boolean |
isDescendantOf(Dict tag)
|
boolean |
isElement()
|
static boolean |
isNewNode(Node node)
|
static void |
moveBeforeTable(Node row,
Node node,
TagTable tt)
|
void |
removeAttribute(AttVal attr)
|
static void |
removeNode(Node node)
|
protected void |
setType(short newType)
|
java.lang.String |
toString()
|
static void |
trimEmptyElement(Lexer lexer,
Node element)
|
static void |
trimInitialSpace(Lexer lexer,
Node element,
Node text)
|
static void |
trimSpaces(Lexer lexer,
Node element)
|
static void |
trimTrailingSpace(Lexer lexer,
Node element,
Node last)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RootNode
public static final short RootNode
DocTypeTag
public static final short DocTypeTag
CommentTag
public static final short CommentTag
ProcInsTag
public static final short ProcInsTag
TextNode
public static final short TextNode
StartTag
public static final short StartTag
EndTag
public static final short EndTag
StartEndTag
public static final short StartEndTag
CDATATag
public static final short CDATATag
SectionTag
public static final short SectionTag
AspTag
public static final short AspTag
JsteTag
public static final short JsteTag
PhpTag
public static final short PhpTag
parent
protected Node parent
prev
protected Node prev
next
protected Node next
last
protected Node last
start
protected int start
end
protected int end
textarray
protected byte[] textarray
type
protected short type
closed
protected boolean closed
implicit
protected boolean implicit
linebreak
protected boolean linebreak
was
protected Dict was
tag
protected Dict tag
element
protected java.lang.String element
attributes
protected AttVal attributes
content
protected Node content
adapter
protected org.w3c.dom.Node adapter
Node
public Node()
Node
public Node(short type,
byte[] textarray,
int start,
int end)
Node
public Node(short type,
byte[] textarray,
int start,
int end,
java.lang.String element,
TagTable tt)
clone
protected java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
getAttrByName
public AttVal getAttrByName(java.lang.String name)
checkAttributes
public void checkAttributes(Lexer lexer)
checkUniqueAttributes
public void checkUniqueAttributes(Lexer lexer)
addAttribute
public void addAttribute(java.lang.String name,
java.lang.String value)
removeAttribute
public void removeAttribute(AttVal attr)
findDocType
public Node findDocType()
discardDocType
public void discardDocType()
discardElement
public static Node discardElement(Node element)
insertNodeAtStart
public static void insertNodeAtStart(Node element,
Node node)
insertNodeAtEnd
public static void insertNodeAtEnd(Node element,
Node node)
insertNodeAsParent
public static void insertNodeAsParent(Node element,
Node node)
insertNodeBeforeElement
public static void insertNodeBeforeElement(Node element,
Node node)
insertNodeAfterElement
public static void insertNodeAfterElement(Node element,
Node node)
trimEmptyElement
public static void trimEmptyElement(Lexer lexer,
Node element)
trimTrailingSpace
public static void trimTrailingSpace(Lexer lexer,
Node element,
Node last)
trimInitialSpace
public static void trimInitialSpace(Lexer lexer,
Node element,
Node text)
trimSpaces
public static void trimSpaces(Lexer lexer,
Node element)
isDescendantOf
public boolean isDescendantOf(Dict tag)
insertDocType
public static void insertDocType(Lexer lexer,
Node element,
Node doctype)
findBody
public Node findBody(TagTable tt)
isElement
public boolean isElement()
moveBeforeTable
public static void moveBeforeTable(Node row,
Node node,
TagTable tt)
fixEmptyRow
public static void fixEmptyRow(Lexer lexer,
Node row)
coerceNode
public static void coerceNode(Lexer lexer,
Node node,
Dict tag)
removeNode
public static void removeNode(Node node)
insertMisc
public static boolean insertMisc(Node element,
Node node)
isNewNode
public static boolean isNewNode(Node node)
hasOneChild
public boolean hasOneChild()
findHTML
public Node findHTML(TagTable tt)
findHEAD
public Node findHEAD(TagTable tt)
checkNodeIntegrity
public boolean checkNodeIntegrity()
addClass
public static void addClass(Node node,
java.lang.String classname)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getAdapter
protected org.w3c.dom.Node getAdapter()
cloneNode
protected Node cloneNode(boolean deep)
setType
protected void setType(short newType)