本文整理了Java中org.htmlparser.Tag.getText()
方法的一些代码示例,展示了Tag.getText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.getText()
方法的具体详情如下:
包路径:org.htmlparser.Tag
类名称:Tag
方法名:getText
暂无
代码示例来源:origin: org.opencms/opencms-core
/**
* @see org.htmlparser.Node#getText()
*/
public String getText() {
return m_decorated.getText();
}
代码示例来源:origin: com.bbossgroups.pdp/pdp-cms
/**
* @see org.htmlparser.Node#getText()
*/
public String getText() {
return m_decorated.getText();
}
代码示例来源:origin: org.opencms/opencms-solr
/**
* @see org.htmlparser.Node#getText()
*/
public String getText() {
return m_decorated.getText();
}
代码示例来源:origin: org.opencms/opencms-core
/**
* Returns the HTML for the given tag itself (not the tag content).
* <p>
*
* @param tag the tag to create the HTML for
*
* @return the HTML for the given tag
*/
public String getTagHtml(Tag tag) {
StringBuffer result = new StringBuffer(32);
result.append('<');
result.append(tag.getText());
result.append('>');
return result.toString();
}
代码示例来源:origin: org.opencms/opencms-solr
/**
* Returns the HTML for the given tag itself (not the tag content).
* <p>
*
* @param tag the tag to create the HTML for
*
* @return the HTML for the given tag
*/
public String getTagHtml(Tag tag) {
StringBuffer result = new StringBuffer(32);
result.append('<');
result.append(tag.getText());
result.append('>');
return result.toString();
}
代码示例来源:origin: omegat-org/omegat
/**
* Recovers tag shortcuts into full tags.
*/
private String unshorcutize(String str) {
for (int i = 0; i < sShortcuts.size(); i++) {
String shortcut = sShortcuts.get(i);
int pos = -1;
while ((pos = str.indexOf(shortcut, pos + 1)) >= 0) {
Tag tag = sTags.get(i);
try {
str = str.substring(0, pos) + "<" + tag.getText() + ">"
+ str.substring(pos + shortcut.length());
} catch (StringIndexOutOfBoundsException sioobe) {
// nothing, string doesn't change
// but prevent endless loop
break;
}
}
}
return str;
}
代码示例来源:origin: com.bbossgroups.pdp/pdp-cms
String text = tag.getText();
if(!tag.isResource())
代码示例来源:origin: omegat-org/omegat
/**
* Queues up something, possibly before a text. If the text is collected
* now, the tag is queued up as translatable by calling
* {@link #queueTranslatable(Tag)}, otherwise it's collected to a special
* list that is inspected when the translatable text is sent to OmegaT core.
*/
protected void queuePrefix(Tag tag) {
if (text) {
queueTranslatable(tag);
} else if (isParagraphTag(tag)) {
flushbefors();
writeout("<" + tag.getText() + ">");
} else {
befors.add(tag);
}
}
内容来源于网络,如有侵权,请联系作者删除!