本文整理了Java中org.dom4j.Node.asXML()
方法的一些代码示例,展示了Node.asXML()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.asXML()
方法的具体详情如下:
包路径:org.dom4j.Node
类名称:Node
方法名:asXML
[英]asXML
returns the textual XML representation of this node.
[中]asXML
返回此节点的文本XML表示形式。
代码示例来源:origin: org.freemarker/freemarker
@Override
void getAsString(Object node, StringWriter sw) {
sw.getBuffer().append(((Node) node).asXML());
}
代码示例来源:origin: pentaho/pentaho-kettle
nodevalue = n.asXML();
} else {
nodevalue = "";
nodevalue = n.asXML();
} else {
nodevalue = "";
代码示例来源:origin: stackoverflow.com
String xPath = "description";
List<Node> nodes = document.selectNodes( xPath );
for (Node node : nodes) {
node.asXML()
}
代码示例来源:origin: USPTO/PatentPublicData
public String getXML() {
return mathNode.asXML();
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
private void evaluate(Node ctxNode, List<String> errors) {
Object obj = ctxNode.selectObject(xpath);
if (obj == null) {
errors.add(errorMessage + ": " + ctxNode.asXML());
} else if (obj instanceof Boolean && !((Boolean) obj)) {
errors.add(errorMessage + ": " + ctxNode.asXML());
} else if (obj instanceof List && ((List<?>) obj).isEmpty()) {
errors.add(errorMessage + ": " + ctxNode.asXML());
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
@Override
void getAsString(Object node, StringWriter sw) {
sw.getBuffer().append(((Node) node).asXML());
}
代码示例来源:origin: org.freemarker/freemarker-gae
@Override
void getAsString(Object node, StringWriter sw) {
sw.getBuffer().append(((Node) node).asXML());
}
代码示例来源:origin: org.freemarker/com.springsource.freemarker
void getAsString(Object node, StringWriter sw) {
sw.getBuffer().append(((Node)node).asXML());
}
代码示例来源:origin: br.com.objectos/sitebricks
static String readAnnotation(Node node) {
String annotation = null;
//if this is a text node, then match for annotations
if (isText(node)) {
final Matcher matcher = AnnotationParser.WIDGET_ANNOTATION_REGEX
.matcher(node.asXML());
if (matcher.find()) {
annotation = matcher.group();
}
}
return annotation;
}
代码示例来源:origin: pentaho/pentaho-platform
public static String transformSnippet( final Node xForm, final IPentahoSession session,
final IDocumentResourceLoader loader ) throws TransformerException {
return XForm.transformSnippet( xForm.asXML(), null, session, loader );
}
代码示例来源:origin: stackoverflow.com
Document doc = new SAXReader().read(...);
Node user = doc.getRootElement()
.element("notification")
.element("Update")
.element("data")
.element("user");
String onlyUserXml = user.asXML();
代码示例来源:origin: com.atlassian.ext/atlassian-plugin-repository-confluence-plugin
protected DateRange parseDateRange(String hitMapXml) throws Exception
{
Document dom4jXPath = DocumentHelper.parseText(hitMapXml);
Node node = dom4jXPath.selectSingleNode("/response/query/org.jfree.data.time.DateRange");
XStream xStream = new XStream();
xStream.setClassLoader(getClass().getClassLoader());
return (DateRange)xStream.fromXML(node.asXML());
}
代码示例来源:origin: dom4j/dom4j
public void run(Node node) throws Exception {
log("Matched pattern: " + match);
log("Node: " + node.asXML());
log("........................................");
// apply any child templates
stylesheet.applyTemplates(node);
}
};
代码示例来源:origin: USPTO/PatentPublicData
public Claim readClaim(Node claimNode) {
String id = claimNode.selectSingleNode("@id").getText();
Claim claim;
List<Node> dependentN = claimNode.selectNodes("*/dependent-claim-reference/@depends_on");
if (dependentN != null && !dependentN.isEmpty()) {
claim = new Claim(id, claimNode.asXML(), ClaimType.DEPENDENT, textProcessor);
Set<String> dependentIds = new HashSet<String>();
for (Node refNode : dependentN) {
dependentIds.add(refNode.getText());
}
claim.setDependentIds(dependentIds);
} else {
claim = new Claim(id, claimNode.asXML(), ClaimType.INDEPENDENT, textProcessor);
}
return claim;
}
代码示例来源:origin: USPTO/PatentPublicData
@Override
public Abstract read() {
Node abstractN = document.selectSingleNode(FRAGMENT_PATH);
if (abstractN == null) {
return new Abstract("", textProcessor);
}
return new Abstract(abstractN.asXML(), textProcessor);
}
}
代码示例来源:origin: USPTO/PatentPublicData
@Override
public Abstract read() {
Node abstractN = document.selectSingleNode(FRAGMENT_PATH);
if (abstractN == null) {
return new Abstract("", textProcessor);
}
return new Abstract(abstractN.asXML(), textProcessor);
}
}
代码示例来源:origin: USPTO/PatentPublicData
@Override
public Abstract read() {
Node abstractN = document.selectSingleNode(FRAGMENT_PATH);
if (abstractN == null) {
return new Abstract("", textProcessor);
}
return new Abstract(abstractN.asXML(), textProcessor);
}
代码示例来源:origin: USPTO/PatentPublicData
@Override
public Abstract read() {
Node abstractN = document.selectSingleNode(FRAGMENT_PATH);
if (abstractN == null) {
return new Abstract("", textProcessor);
}
return new Abstract(abstractN.asXML(), textProcessor);
}
代码示例来源:origin: USPTO/PatentPublicData
public UspcClassification getUSPC(Node classN) {
Node uspcN = classN.selectSingleNode("OCL");
if (uspcN != null) {
try {
String classStr = uspcN.getText().trim();
UspcClassification uspc = new UspcClassification();
uspc.parseText(classStr);
uspc.setIsMainClassification(true);
return uspc;
} catch (ParseException e) {
LOGGER.warn("Failed to Parse USPC Classification: '{}' from : {}", uspcN.getText(), classN.asXML());
}
}
return null;
}
代码示例来源:origin: dom4j/dom4j
protected void testXPath(String xpathExpression) {
NodeFilter nodeFilter = DocumentHelper
.createXPathFilter(xpathExpression);
assertTrue("No NodeFilter object was created", nodeFilter != null);
List list = document.selectNodes("//author");
for (Iterator iter = list.iterator(); iter.hasNext();) {
Node node = (Node) iter.next();
if (nodeFilter.matches(node)) {
log("Matches node: " + node.asXML());
} else {
log("No match for node: " + node.asXML());
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!