本文整理了Java中org.htmlparser.Tag.getRawTagName()
方法的一些代码示例,展示了Tag.getRawTagName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.getRawTagName()
方法的具体详情如下:
包路径:org.htmlparser.Tag
类名称:Tag
方法名:getRawTagName
[英]Return the name of this tag.
[中]返回此标记的名称。
代码示例来源:origin: com.bbossgroups.pdp/pdp-cms
/**
* @see org.htmlparser.Tag#getRawTagName()
*/
public String getRawTagName() {
return m_decorated.getRawTagName();
}
代码示例来源:origin: org.opencms/opencms-core
/**
* @see org.htmlparser.Tag#getRawTagName()
*/
public String getRawTagName() {
return m_decorated.getRawTagName();
}
代码示例来源:origin: org.opencms/opencms-solr
/**
* @see org.htmlparser.Tag#getRawTagName()
*/
public String getRawTagName() {
return m_decorated.getRawTagName();
}
代码示例来源:origin: org.apache.uima/ruta-core
private boolean isTagClosed(Tag tag) {
return tag.getRawTagName().endsWith("/");
}
代码示例来源:origin: org.apache.uima/textmarker-core
private boolean isTagClosed(Tag tag) {
return tag.getRawTagName().endsWith("/");
}
代码示例来源:origin: org.apache.uima/textmarker-core
private String getName(Tag tag) {
String result = tag.getRawTagName().toUpperCase();
if (result.endsWith("/")) {
result = result.substring(0, result.length() - 1);
}
if (result.startsWith("/")) {
result = result.substring(1);
}
return result;
}
代码示例来源:origin: org.apache.uima/ruta-core
private String getName(Tag tag) {
String result = tag.getRawTagName().toUpperCase();
if (result.endsWith("/")) {
result = result.substring(0, result.length() - 1);
}
if (result.startsWith("/")) {
result = result.substring(1);
}
return result;
}
代码示例来源:origin: CloudSlang/cs-actions
public void visitTag(Tag tag) {
if (tag.getRawTagName().equalsIgnoreCase("img")) {
String imageValue = tag.getAttribute("src");
if (imageValue.contains("base64")) {
String contentId = getContentId();
tag.setAttribute("src", "cid:" + contentId);
base64ImagesMap.put(contentId,
imageValue.substring(imageValue.indexOf("base64") + 7, imageValue.length()));
}
}
}
代码示例来源:origin: brix-cms/brix-cms
private boolean isOpenClose(org.htmlparser.Tag tag) {
if (tag.getRawTagName().endsWith("/")) {
return true;
} else {
List<?> atts = tag.getAttributesEx();
Attribute a = (Attribute) atts.get(atts.size() - 1);
return a.getName() != null && a.getName().equals("/");
}
}
代码示例来源:origin: org.htmlparser/htmlparser
/**
* Creates an end tag with the same name as the given tag.
* @param tag The tag to end.
* @param lexer The object containg the node factory.
* @param page The page the tag is on (virtually).
* @param position The offset into the page at which the tag is to
* be anchored.
* @return An end tag with the name '"/" + tag.getTagName()' and a start
* and end position at the given position. The fact these positions are
* equal may be used to distinguish it as a virtual tag later on.
*/
protected Tag createVirtualEndTag (Tag tag, Lexer lexer, Page page, int position)
throws
ParserException
{
Tag ret;
String name;
Vector attributes;
name = "/" + tag.getRawTagName ();
attributes = new Vector ();
attributes.addElement (new Attribute (name, (String)null));
ret = lexer.getNodeFactory ().createTagNode (
page, position, position, attributes);
return (ret);
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Creates an end tag with the same name as the given tag.
* @param tag The tag to end.
* @param lexer The object containg the node factory.
* @param page The page the tag is on (virtually).
* @param position The offset into the page at which the tag is to
* be anchored.
* @return An end tag with the name '"/" + tag.getTagName()' and a start
* and end position at the given position. The fact these positions are
* equal may be used to distinguish it as a virtual tag later on.
*/
protected Tag createVirtualEndTag (Tag tag, Lexer lexer, Page page, int position)
throws
ParserException
{
Tag ret;
String name;
List attributes;
name = "/" + tag.getRawTagName ();
attributes = new ArrayList ();
attributes.add (new Attribute (name, (String)null));
ret = lexer.getNodeFactory ().createTagNode (
page, position, position, attributes);
return (ret);
}
代码示例来源:origin: brix-cms/brix-cms
private void processTag(List<AbstractContainer> nodes, int current, List<Item> items,
org.htmlparser.Tag tag) {
final Tag.Type type;
final String rawName = tag.getRawTagName();
if (rawName.startsWith("/")) {
type = Tag.Type.CLOSE;
} else if (isOpenClose(tag)) {
type = Tag.Type.OPEN_CLOSE;
} else {
type = Tag.Type.OPEN;
}
final String tagName = tag.getTagName().toLowerCase();
if ("!doctype".equals(tagName)) {
this.doctype = tag.toHtml();
} else if (type == Tag.Type.CLOSE) {
if (!isKnownBrixTag(tagName)) {
Map<String, String> attributes = Collections.emptyMap();
items.add(new SimpleTag(tagName, type, attributes));
}
} else {
Map<String, String> attributes = getAttributes(tag);
if (isKnownBrixTag(tagName)) {
processBrixTag(nodes, current, items, tagName, getAttributes(tag), type);
} else {
items.add(new SimpleTag(tagName, type, attributes));
}
}
}
代码示例来源:origin: org.alfresco.surf/spring-webscripts
buf.append('<').append(tag.getRawTagName());
for (Attribute attr : attrs)
buf.append('<').append(tag.getRawTagName()).append('>');
代码示例来源:origin: org.springframework.extensions.surf/spring-webscripts
buf.append('<').append(tag.getRawTagName());
for (Attribute attr : attrs)
buf.append('<').append(tag.getRawTagName()).append('>');
代码示例来源:origin: deas/alfresco
buf.append('<').append(tag.getRawTagName());
for (Attribute attr : attrs)
buf.append('<').append(tag.getRawTagName()).append('>');
processNodes(buf, tag.getChildren().elements(), encode, false);
if (tag.getEndTag() != null)
代码示例来源:origin: org.everit.templating/org.everit.templating.html
tagNode.setTagName(tag.getRawTagName());
Iterator<PageAttribute> iterator = attributes.iterator();
内容来源于网络,如有侵权,请联系作者删除!