/** * @see org.htmlparser.Node#getStartPosition() */ public int getStartPosition() { return m_decorated.getStartPosition(); }
/** * @see org.htmlparser.Node#getStartPosition() */ public int getStartPosition() { return m_decorated.getStartPosition(); }
/** * @see org.htmlparser.Node#getStartPosition() */ public int getStartPosition() { return m_decorated.getStartPosition(); }
public void visitTag(Tag tag) { String name = tag.getTagName().toLowerCase(); if ("div".equals(name)) { divDepth++; if (divDepth == 1) { elementStart = tag.getStartPosition(); } } }
@Override public void visitTag(Tag tag) { super.visitTag(tag); String trimmedTagnameLowercase = tag.getTagName().toLowerCase().trim(); if (trimmedTagnameLowercase.equals("body")) { inBody = true; } else if (trimmedTagnameLowercase.equals("script")) { inScript = true; } boolean matchedByPattern = false; if (newlineInducingTagPattern != null) { Matcher matcher = newlineInducingTagPattern.matcher(trimmedTagnameLowercase); if (matcher.matches()) { matchedByPattern = true; } } if (matchedByPattern || (newlineInducingTags != null && newlineInducingTags .contains(trimmedTagnameLowercase))) { int begin = tag.getStartPosition(); linebreaksFromHtmlTags.add(new HtmlConverterPSpanReplacement(begin, begin + 1, HtmlConverter.LINEBREAK)); } if (gapInducingTags != null && gapInducingTags.contains(trimmedTagnameLowercase)) { int begin = tag.getStartPosition(); gapsFromHtmlTags.add(new HtmlConverterPSpanReplacement(begin, begin + gapText.length(), gapText)); } }
private void handleFakeTag(final Tag tag) { if (visitMode != VisitMode.NONE) { currentSB.append(tag.getPage().getText(tag.getStartPosition(), tag.getEndPosition())); } }
/** * Return the text between the start tag and the end tag. * @return The contents of the CompositeTag. */ public String getStringText () { String ret; int start = getEndPosition (); int end = mEndTag.getStartPosition (); ret = getPage ().getText (start, end); return (ret); }
/** * Constructor. * * @param tag * The tag that we want to store information about. */ public TagInfo(final Tag tag) { Page page = tag.getPage(); startPosition = tag.getStartPosition(); int endPosition = tag.getEndPosition(); chars = new char[endPosition - startPosition]; page.getText(chars, 0, startPosition, endPosition); } }
int beginTagEnd = endTag.getStartPosition (); int endTagEnd = endTag.getEndPosition ();
int beginTagEnd = endTag.getStartPosition (); int endTagEnd = endTag.getEndPosition ();
int beginTagEnd = endTag.getStartPosition (); int endTagEnd = endTag.getEndPosition ();
int beginTagEnd = endTag.getStartPosition (); int endTagEnd = endTag.getEndPosition ();
/** * Constructor. * * @param tag * The tag that this node definition belongs to. * @param templateFileName * the name of the template file. */ public TagNode(final Tag tag, final String templateFileName) { emptyTag = tag.isEmptyXmlTag(); Page page = tag.getPage(); startPositionInTemplate = tag.getStartPosition(); int endPosition = tag.getEndPosition(); int length = endPosition - startPositionInTemplate; textRepresentation = new char[length]; page.getText(textRepresentation, 0, startPositionInTemplate, endPosition); this.templateFileName = templateFileName; }
final boolean positionOfAttributeValue, final Coordinate startPosition) { Page page = tag.getPage(); int tagStartPosition = tag.getStartPosition(); int tagEndPosition = tag.getEndPosition();
lexer.setPosition (next.getStartPosition ()); node = null; attributes.add (new Attribute (name, null)); Tag opener = lexer.getNodeFactory ().createTagNode ( lexer.getPage (), next.getStartPosition (), next.getEndPosition (), attributes);