Package org.htmlparser.tags.data

Examples of org.htmlparser.tags.data.TagData


   *            The initiating url of the scan (Where the html page lies)
   * @param reader
   *            The reader object responsible for reading the html page
   */
  public Tag scan(Tag tag, String url, NodeReader reader, String currLine) throws ParserException {
    return createTag(new TagData(tag.elementBegin(), tag.elementEnd(), tag.getText(), currLine), tag, url);
  }
View Full Code Here


  protected Tag getReplacedEndTag(Tag tag, NodeReader reader, String currentLine) {
    // Replace tag - it was a <A> tag - replace with </a>
    String newLine = replaceFaultyTagWithEndTag(tag, currentLine);
    reader.changeLine(newLine);
    return new EndTag(new TagData(tag.elementBegin(), tag.elementBegin() + 3, tag.getTagName(), currentLine));
  }
View Full Code Here

  protected Tag getInsertedEndTag(Tag tag, NodeReader reader, String currentLine) {
    // Insert end tag
    String newLine = insertEndTagBeforeNode(tag, currentLine);
    reader.changeLine(newLine);
    return new EndTag(new TagData(tag.elementBegin(), tag.elementBegin() + 3, tag.getTagName(), currentLine));
  }
View Full Code Here

  protected void setUp() {
    helper = new CompositeTagScannerHelper(null, null, null, null, null, false);
  }

  public void testIsXmlEndTagForRealXml() {
    Tag tag = new Tag(new TagData(0, 0, "something/", ""));
    assertTrue("should be an xml end tag", helper.isXmlEndTag(tag));
  }
View Full Code Here

    Tag tag = new Tag(new TagData(0, 0, "something/", ""));
    assertTrue("should be an xml end tag", helper.isXmlEndTag(tag));
  }

  public void testIsXmlEndTagForFalseMatches() {
    Tag tag = new Tag(new TagData(0, 0, "a href=http://someurl.com/", ""));
    assertFalse("should not be an xml end tag", helper.isXmlEndTag(tag));
  }
View Full Code Here

  protected void setUp() {
    parser = new AttributeParser();
  }

  public void getParameterTableFor(String tagContents) {
    tag = new Tag(new TagData(0, 0, tagContents, ""));
    table = parser.parseAttributes(tag);

  }
View Full Code Here

TOP

Related Classes of org.htmlparser.tags.data.TagData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.