use of com.smartandroid.sa.tag.nodes.Comment in project SmartAndroidSource by jaychou2012.
the class HtmlTreeBuilder method insert.
void insert(Token.Comment commentToken) {
Comment comment = new Comment(commentToken.getData(), baseUri);
insertNode(comment);
}
use of com.smartandroid.sa.tag.nodes.Comment in project SmartAndroidSource by jaychou2012.
the class XmlTreeBuilder method insert.
void insert(Token.Comment commentToken) {
Comment comment = new Comment(commentToken.getData(), baseUri);
Node insert = comment;
if (commentToken.bogus) {
// xml declarations are emitted as bogus
// comments (which is right for html, but
// not xml)
String data = comment.getData();
if (data.length() > 1 && (data.startsWith("!") || data.startsWith("?"))) {
String declaration = data.substring(1);
insert = new XmlDeclaration(declaration, comment.baseUri(), data.startsWith("!"));
}
}
insertNode(insert);
}
Aggregations