ezvcard.util
Class HtmlUtils

java.lang.Object
  extended by ezvcard.util.HtmlUtils

public class HtmlUtils
extends Object

Generic HTML utility methods.

Author:
Michael Angstadt

Method Summary
static boolean isChildOf(Element child, Elements possibleParents)
          Determines whether the given element is a child of one of the given parent elements.
static Element toElement(String html)
          Converts an HTML string to an HTML element.
static Element toElement(String html, String baseUrl)
          Converts an HTML string to an HTML element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isChildOf

public static boolean isChildOf(Element child,
                                Elements possibleParents)
Determines whether the given element is a child of one of the given parent elements.

Parameters:
child - the child element
possibleParents - the possible parents
Returns:
true if it is a child, false if not

toElement

public static Element toElement(String html)
Converts an HTML string to an HTML element.

Parameters:
html - the HTML
Returns:
the HTML element

toElement

public static Element toElement(String html,
                                String baseUrl)
Converts an HTML string to an HTML element.

Parameters:
html - the HTML
baseUrl - the base URL
Returns:
the HTML element


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.