Class HtmlDomDocNewsletter
- java.lang.Object
-
- fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter
-
public class HtmlDomDocNewsletter extends java.lang.ObjectThis classes provides implementation to retrieve urls from specified tags on an HTML page.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONSTANT_PROTOCOL_DELIMITERstatic java.lang.StringCONSTANT_STATIC_URLstatic fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrlELEMENT_ATo define a anchor, a element must have: "a" tag name The url is contained in the attributed named "href"static fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrlELEMENT_CSSTo define a CSS, html element must have: "link" tag name "rel" attribute equal to "stylesheet" The url is contained in the attributed named "href"static fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrlELEMENT_FORMTo define a form, form element must have: "form" tag name The url is contained in the attributed named "action"static fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrlELEMENT_IMGTo define an image, html element must have: "img" tag name The url is contained in the attributed named "src"static fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrlELEMENT_JAVASCRIPTTo define a javascript, html element must have: "script" tag name "type" attribute equal to "text/javascript" The url is contained in the attributed named "src"
-
Constructor Summary
Constructors Constructor Description HtmlDomDocNewsletter(java.lang.String strHtml, java.lang.String strBaseUrl)Instantiates an HtmlDocument after having built the DOM tree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvertAllRelativesUrls(fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl elementType)Get the relatives urls of all html elements specified by elementType and convert its to absolutes urlsjava.lang.StringgetContent()Get the document content
-
-
-
Field Detail
-
CONSTANT_STATIC_URL
public static final java.lang.String CONSTANT_STATIC_URL
- See Also:
- Constant Field Values
-
CONSTANT_PROTOCOL_DELIMITER
public static final java.lang.String CONSTANT_PROTOCOL_DELIMITER
- See Also:
- Constant Field Values
-
ELEMENT_CSS
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl ELEMENT_CSS
To define a CSS, html element must have:- "link" tag name
- "rel" attribute equal to "stylesheet"
-
ELEMENT_JAVASCRIPT
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl ELEMENT_JAVASCRIPT
To define a javascript, html element must have:- "script" tag name
- "type" attribute equal to "text/javascript"
-
ELEMENT_IMG
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl ELEMENT_IMG
To define an image, html element must have:- "img" tag name
-
ELEMENT_A
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl ELEMENT_A
To define a anchor, a element must have:- "a" tag name
-
ELEMENT_FORM
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl ELEMENT_FORM
To define a form, form element must have:- "form" tag name
-
-
Method Detail
-
convertAllRelativesUrls
public void convertAllRelativesUrls(fr.paris.lutece.plugins.newsletter.util.HtmlDomDocNewsletter.ElementUrl elementType)
Get the relatives urls of all html elements specified by elementType and convert its to absolutes urls- Parameters:
elementType- the type of element to get
-
getContent
public java.lang.String getContent()
Get the document content- Returns:
- The String content
-
-