本文整理了Java中org.htmlparser.Attribute.isWhitespace()
方法的一些代码示例,展示了Attribute.isWhitespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.isWhitespace()
方法的具体详情如下:
包路径:org.htmlparser.Attribute
类名称:Attribute
方法名:isWhitespace
[英]Predicate to determine if this attribute is whitespace.
[中]谓词来确定此属性是否为空白。
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Look up an attribute's XML qualified (prefixed) name by index.
*
* @param index The attribute index (zero-based).
* @return The XML qualified name, or the empty string
* if none is available, or null if the index
* is out of range.
* @see #getLength
*/
public String getQName (int index)
{
Attribute attribute;
String ret;
attribute = (Attribute)(mTag.getAttributesEx ().get (index + 1));
if (attribute.isWhitespace ())
ret = "#text";
else
ret = attribute.getName ();
return (ret);
}
代码示例来源:origin: brix-cms/brix-cms
@SuppressWarnings("unchecked")
private Map<String, String> getAttributes(org.htmlparser.Tag tag) {
Map<String, String> result = new HashMap<String, String>();
List<?> original = tag.getAttributesEx();
List<Attribute> list = new ArrayList<Attribute>((Collection<? extends Attribute>) original
.subList(1, original.size()));
for (Attribute a : list) {
if (a.getName() != null && !a.getName().equals("/") && !a.isWhitespace()) {
result.put(a.getName(), a.getValue());
}
}
return result;
}
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
if (!attribute.isWhitespace ())
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
if ((0 != length) && !((Attribute)attributes.get (length - 1)).isWhitespace ())
attributes.add (new Attribute (" "));
attributes.add (attribute);
代码示例来源:origin: org.htmlparser/htmllexer
length += 2;
else if ((1 != length) && !((Attribute)attributes.elementAt (length - 2)).isWhitespace ())
if ((0 != length) && !((Attribute)attributes.elementAt (length - 1)).isWhitespace ())
attributes.addElement (new Attribute (" "));
attributes.addElement (attribute);
内容来源于网络,如有侵权,请联系作者删除!