限定符和类型 | 接口和说明 |
---|---|
interface |
Remark
This interface represents a comment in the HTML document.
|
interface |
Tag
This interface represents a tag (<xxx yyy="zzz">) in the HTML document.
|
interface |
Text
This interface represents a piece of the content of the HTML document.
|
限定符和类型 | 方法和说明 |
---|---|
Node |
Node.getFirstChild()
Get the first child of this node.
|
Node |
Node.getLastChild()
Get the last child of this node.
|
Node |
Node.getNextSibling()
Get the next sibling to this node.
|
Node |
Node.getParent()
Get the parent of this node.
|
Node |
Node.getPreviousSibling()
Get the previous sibling to this node.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
NodeFilter.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
void |
Node.setParent(Node node)
Sets the parent of this node.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
XorFilter.accept(Node node)
Accept nodes that are acceptable to an odd number of its predicate filters.
|
boolean |
TagNameFilter.accept(Node node)
Accept nodes that are tags and have a matching tag name.
|
boolean |
StringFilter.accept(Node node)
Accept string nodes that contain the string.
|
boolean |
RegexFilter.accept(Node node)
Accept string nodes that match the regular expression.
|
boolean |
OrFilter.accept(Node node)
Accept nodes that are acceptable to any of its predicate filters.
|
boolean |
NotFilter.accept(Node node)
Accept nodes that are not acceptable to the predicate filter.
|
boolean |
NodeClassFilter.accept(Node node)
Accept nodes that are assignable from the class provided in
the constructor.
|
boolean |
LinkStringFilter.accept(Node node)
Accept nodes that are a LinkTag and
have a URL that matches the pattern supplied in the constructor.
|
boolean |
LinkRegexFilter.accept(Node node)
Accept nodes that are a LinkTag and have a URL
that matches the regex pattern supplied in the constructor.
|
boolean |
IsEqualFilter.accept(Node node)
Accept the node.
|
boolean |
HasSiblingFilter.accept(Node node)
Accept tags with a sibling acceptable to the filter.
|
boolean |
HasParentFilter.accept(Node node)
Accept tags with parent acceptable to the filter.
|
boolean |
HasChildFilter.accept(Node node)
Accept tags with children acceptable to the filter.
|
boolean |
HasAttributeFilter.accept(Node node)
Accept tags with a certain attribute.
|
boolean |
CssSelectorNodeFilter.accept(Node node)
Accept nodes that match the selector expression.
|
boolean |
AndFilter.accept(Node node)
Accept nodes that are acceptable to all of its predicate filters.
|
构造器和说明 |
---|
IsEqualFilter(Node node)
Creates a new IsEqualFilter that accepts only the node provided.
|
限定符和类型 | 方法和说明 |
---|---|
Node |
Lexer.nextNode()
Get the next node from the source.
|
Node |
Lexer.nextNode(boolean quotesmart)
Get the next node from the source.
|
Node |
Lexer.parseCDATA()
Return CDATA as a text node.
|
Node |
Lexer.parseCDATA(boolean quotesmart)
Return CDATA as a text node.
|
限定符和类型 | 类和说明 |
---|---|
class |
AbstractNode
The concrete base class for all types of nodes (tags, text remarks).
|
class |
RemarkNode
The remark tag is identified and represented by this class.
|
class |
TagNode
TagNode represents a generic tag.
|
class |
TextNode
Normal text in the HTML document is represented by this class.
|
限定符和类型 | 方法和说明 |
---|---|
Node |
AbstractNode.getFirstChild()
Get the first child of this node.
|
Node |
AbstractNode.getLastChild()
Get the last child of this node.
|
Node |
AbstractNode.getNextSibling()
Get the next sibling to this node.
|
Node |
AbstractNode.getParent()
Get the parent of this node.
|
Node |
AbstractNode.getPreviousSibling()
Get the previous sibling to this node.
|
限定符和类型 | 方法和说明 |
---|---|
void |
AbstractNode.setParent(Node node)
Sets the parent of this node.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
TagNameFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
StringFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
RegexFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
OrFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
NotFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
NodeClassFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
HasSiblingFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
HasParentFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
HasChildFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
HasAttributeFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
boolean |
AndFilterWrapper.accept(Node node)
Predicate to determine whether or not to keep the given node.
|
限定符和类型 | 类和说明 |
---|---|
class |
AppletTag
AppletTag represents an <Applet> tag.
|
class |
BaseHrefTag
BaseHrefTag represents an <Base> tag.
|
class |
BodyTag
A Body Tag.
|
class |
Bullet
A bullet tag.
|
class |
BulletList
A bullet list tag.
|
class |
CompositeTag
The base class for tags that have an end tag.
|
class |
DefinitionList
A definition list tag (dl).
|
class |
DefinitionListBullet
A definition list bullet tag (either DD or DT).
|
class |
Div
A div tag.
|
class |
DoctypeTag
The HTML Document Declaration Tag can identify <!DOCTYPE> tags.
|
class |
FormTag
Represents a FORM tag.
|
class |
FrameSetTag
Identifies an frame set tag.
|
class |
FrameTag
Identifies a frame tag
|
class |
HeadingTag
A heading (h1 - h6) tag.
|
class |
HeadTag
A head tag.
|
class |
Html
A html tag.
|
class |
ImageTag
Identifies an image tag.
|
class |
InputTag
An input tag in a form.
|
class |
JspTag
The JSP/ASP tags like <%...%> can be identified by this class.
|
class |
LabelTag
A label tag.
|
class |
LinkTag
Identifies a link tag.
|
class |
MetaTag
A Meta Tag
|
class |
ObjectTag
ObjectTag represents an <Object> tag.
|
class |
OptionTag
An option tag within a form.
|
class |
ParagraphTag
A paragraph (p) tag.
|
class |
ProcessingInstructionTag
The XML processing instructions like <?
|
class |
ScriptTag
A script tag.
|
class |
SelectTag
A select tag within a form.
|
class |
SHTag
A div tag.
|
class |
Span
A span tag.
|
class |
StyleTag
A StyleTag represents a <style> tag.
|
class |
TableColumn
A table column tag.
|
class |
TableHeader
A table header tag.
|
class |
TableRow
A table row tag.
|
class |
TableTag
A table tag.
|
class |
TextareaTag
A text area tag within a form.
|
class |
TitleTag
A title tag.
|
class |
UlTag
A div tag.
|
限定符和类型 | 方法和说明 |
---|---|
Node |
CompositeTag.childAt(int index)
Get child at given index
|
Node |
CompositeTag.getChild(int index)
Get the child of this node at the given position.
|
Node[] |
CompositeTag.getChildrenAsNodeArray()
Get the children as an array of
Node objects. |
限定符和类型 | 方法和说明 |
---|---|
int |
CompositeTag.findPositionOf(Node searchNode)
Returns the node number of a child node given the node object.
|
限定符和类型 | 方法和说明 |
---|---|
void |
ParserTestCase.assertSameType(java.lang.String displayMessage,
Node expected,
Node actual) |
void |
ParserTestCase.assertTagEquals(java.lang.String displayMessage,
Node expected,
Node actual) |
限定符和类型 | 方法和说明 |
---|---|
void |
LexerTests.checkTagNames(Node node)
Check the tag name for one of the ones expected on the page.
|
限定符和类型 | 类和说明 |
---|---|
static class |
CompositeTagScannerTest.AnotherTag |
static class |
CompositeTagScannerTest.CustomTag |
限定符和类型 | 方法和说明 |
---|---|
void |
CharacterTranslationTest.Generate.gather(Node node,
java.lang.StringBuffer buffer) |
限定符和类型 | 方法和说明 |
---|---|
void |
TagFindingVisitorTest.assertTagNameShouldBe(java.lang.String message,
Node node,
java.lang.String expectedTagName) |
限定符和类型 | 方法和说明 |
---|---|
Node |
NodeList.elementAt(int i) |
static Node[] |
ParserUtils.findTypeInNode(Node node,
java.lang.Class type)
Search given node and pick up any objects of given type.
|
Node |
NodeTreeWalker.getCurrentNode()
Get the Node in the tree that the NodeTreeWalker is current at.
|
Node |
NodeTreeWalker.getRootNode()
Get the root Node that defines the scope of the tree to traverse.
|
Node |
SimpleNodeIterator.nextNode()
Get the next node.
|
Node |
NodeTreeWalker.nextNode()
Traverses to the next Node from the current Node, using either depth-first or breadth-first tree traversal as appropriate.
|
Node |
NodeIterator.nextNode()
Get the next node.
|
Node |
IteratorImpl.nextNode()
Get the next node.
|
Node |
NodeList.remove(int index)
Remove the node at index.
|
Node[] |
NodeList.toNodeArray() |
限定符和类型 | 方法和说明 |
---|---|
void |
NodeList.add(Node node) |
boolean |
NodeList.contains(Node node)
Check to see if the NodeList contains the supplied Node.
|
void |
NodeList.copyToNodeArray(Node[] array) |
static Node[] |
ParserUtils.findTypeInNode(Node node,
java.lang.Class type)
Search given node and pick up any objects of given type.
|
int |
NodeList.indexOf(Node node)
Finds the index of the supplied Node.
|
void |
NodeList.prepend(Node node)
Insert the given node at the head of the list.
|
boolean |
NodeList.remove(Node node)
Remove the supplied Node from the list.
|
void |
NodeTreeWalker.setRootNode(Node rootNode)
Sets the specified Node as the root Node.
|
构造器和说明 |
---|
NodeList(Node node)
Create a one element node list.
|
NodeTreeWalker(Node rootNode)
Creates a new instance of NodeTreeWalker using depth-first tree traversal, without limits on how deep it may traverse.
|
NodeTreeWalker(Node rootNode,
boolean depthFirst)
Creates a new instance of NodeTreeWalker using the specified type of tree traversal, without limits on how deep it may traverse.
|
NodeTreeWalker(Node rootNode,
boolean depthFirst,
int maxDepth)
Creates a new instance of NodeTreeWalker using the specified type of tree traversal and maximum depth from the root Node to traverse.
|
限定符和类型 | 方法和说明 |
---|---|
Node[] |
ObjectFindingVisitor.getTags() |
Node[] |
TagFindingVisitor.getTags(int index) |