#72 getElementsWithAttribute **FIX**

closed-works-for-me
None
5
2007-12-30
2006-07-29
Galvinator
No

Supports elements such as font, etc. I have tested this
to the best of my ability but it works fine for what im
using it for!

static class DefaultElementFactory extends
HTMLElementFactory {

HTMLElement toHTMLElement(
NodeUtils.PreOrderTraversal pot, ParsedHTML parsedHTML,
Element element ) {
// GALVINATOR HACK TO GET FONTS TO PASS
//if (element.getAttribute( "id" ).equals(
"" )) return null;
return parsedHTML.toDefaultElement( element );
}

protected void addToLists(
NodeUtils.PreOrderTraversal pot, HTMLElement
htmlElement ) {}
}

Discussion

  • Galvinator

    Galvinator - 2006-07-29

    ParserHTML.java

     
  • Galvinator

    Galvinator - 2006-07-29
    • status: open --> open-works-for-me
     
  • Jeff Mills

    Jeff Mills - 2006-09-29

    Logged In: YES
    user_id=1014493

    I should have looked here first. After debugging my attempt
    to find elements having a specific "class" attribute, I
    arrived at the same solution.

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2007-12-30

    Logged In: YES
    user_id=1220573
    Originator: NO

    The change is now in the subversion repository and will be in the next release.

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2007-12-30

    Logged In: YES
    user_id=1220573
    Originator: NO

    this change breaks no test cases - i wonder what the original if statement was for in the first place
    // [ 1531005 ] getElementsWithAttribute **FIX**
    //if (element.getAttribute( "id" ).equals( "" )) {
    // return null;
    //}

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2007-12-30
    • assigned_to: nobody --> wolfgang_fahl
    • status: open-works-for-me --> closed-works-for-me
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks