com.gargoylesoftware.htmlunit.html.HtmlBold Java Examples

The following examples show how to use com.gargoylesoftware.htmlunit.html.HtmlBold. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HTMLPhraseElement.java    From htmlunit with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the DOM node that corresponds to this JavaScript object.
 * @param domNode the DOM node
 */
@Override
public void setDomNode(final DomNode domNode) {
    super.setDomNode(domNode);

    if (getBrowserVersion().hasFeature(JS_XML_SUPPORT_VIA_ACTIVEXOBJECT)) {
        if ((domNode instanceof HtmlAbbreviated && getBrowserVersion().hasFeature(HTMLABBREVIATED))
            || domNode instanceof HtmlAcronym
            || domNode instanceof HtmlBidirectionalOverride
            || domNode instanceof HtmlBig
            || domNode instanceof HtmlBlink
            || domNode instanceof HtmlBold
            || domNode instanceof HtmlCitation
            || domNode instanceof HtmlCode
            || domNode instanceof HtmlDefinition
            || domNode instanceof HtmlEmphasis
            || domNode instanceof HtmlItalic
            || domNode instanceof HtmlKeyboard
            || domNode instanceof HtmlNoBreak
            || domNode instanceof HtmlS
            || domNode instanceof HtmlSample
            || domNode instanceof HtmlSmall
            || domNode instanceof HtmlStrong
            || domNode instanceof HtmlStrike
            || domNode instanceof HtmlSubscript
            || domNode instanceof HtmlSuperscript
            || domNode instanceof HtmlTeletype
            || domNode instanceof HtmlUnderlined
            || domNode instanceof HtmlVariable
            ) {
            ActiveXObject.addProperty(this, "cite", true, true);
            ActiveXObject.addProperty(this, "dateTime", true, true);
        }
    }
}
 
Example #2
Source File: HTMLPhraseElement.java    From HtmlUnit-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the DOM node that corresponds to this JavaScript object.
 * @param domNode the DOM node
 */
@Override
public void setDomNode(final DomNode domNode) {
    super.setDomNode(domNode);

    if (getBrowserVersion().hasFeature(JS_XML_SUPPORT_VIA_ACTIVEXOBJECT)) {
        if ((domNode instanceof HtmlAbbreviated && getBrowserVersion().hasFeature(HTMLABBREVIATED))
            || domNode instanceof HtmlAcronym
            || domNode instanceof HtmlBidirectionalOverride
            || domNode instanceof HtmlBig
            || domNode instanceof HtmlBlink
            || domNode instanceof HtmlBold
            || domNode instanceof HtmlCitation
            || domNode instanceof HtmlCode
            || domNode instanceof HtmlDefinition
            || domNode instanceof HtmlEmphasis
            || domNode instanceof HtmlItalic
            || domNode instanceof HtmlKeyboard
            || domNode instanceof HtmlNoBreak
            || domNode instanceof HtmlS
            || domNode instanceof HtmlSample
            || domNode instanceof HtmlSmall
            || domNode instanceof HtmlStrong
            || domNode instanceof HtmlStrike
            || domNode instanceof HtmlSubscript
            || domNode instanceof HtmlSuperscript
            || domNode instanceof HtmlTeletype
            || domNode instanceof HtmlUnderlined
            || domNode instanceof HtmlVariable
            ) {
            ActiveXObject.addProperty(this, "cite", true, true);
            ActiveXObject.addProperty(this, "dateTime", true, true);
        }
    }
}
 
Example #3
Source File: TvMaoCrawler.java    From MyTv with Apache License 2.0 5 votes vote down vote up
/**
 * 解析指定城市下的电视台
 * 
 * @param htmlPage
 * @param city
 *            所属城市
 * @return
 */
private List<TvStation> getTvStations(HtmlPage htmlPage, String city) {
	String html = htmlPage.asXml();
	List<?> elements = htmlPage
			.getByXPath("//div[@class='chlsnav']/div[@class='pbar']/b");
	HtmlBold hb = (HtmlBold) elements.get(0);
	String classify = hb.getTextContent().trim();
	MyTvUtils.outputCrawlData(getCrawlerName(), html,
			getCrawlFileName(city, classify));
	List<TvStation> stationList = parseTvStation(city, html);
	logger.debug("tv station crawled." + stationList);
	return stationList;
}