本文整理了Java中org.apache.axiom.om.OMNode.insertSiblingBefore()
方法的一些代码示例,展示了OMNode.insertSiblingBefore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OMNode.insertSiblingBefore()
方法的具体详情如下:
包路径:org.apache.axiom.om.OMNode
类名称:OMNode
方法名:insertSiblingBefore
[英]Inserts a sibling just before the current node. The current node must have a parent for this operation to succeed. If the node to be inserted has a parent, then it will first be detached.
[中]在当前节点之前插入同级节点。当前节点必须有父节点,此操作才能成功。如果要插入的节点有父节点,则首先将其分离。
代码示例来源:origin: org.apache.axis2/axis2-kernel
protected void addPoliciesToDescriptionElement(List policies,
OMElement descriptionElement) throws XMLStreamException,
FactoryConfigurationError {
for (int i = 0; i < policies.size(); i++) {
Policy policy = (Policy) policies.get(i);
OMElement policyElement = PolicyUtil.getPolicyComponentAsOMElement(
policy, filter);
OMNode firstChild = descriptionElement.getFirstOMChild();
if (firstChild != null) {
firstChild.insertSiblingBefore(policyElement);
} else {
descriptionElement.addChild(policyElement);
}
}
}
代码示例来源:origin: apache/axis2-java
protected void addPoliciesToDescriptionElement(List policies,
OMElement descriptionElement) throws XMLStreamException,
FactoryConfigurationError {
for (int i = 0; i < policies.size(); i++) {
Policy policy = (Policy) policies.get(i);
OMElement policyElement = PolicyUtil.getPolicyComponentAsOMElement(
policy, filter);
OMNode firstChild = descriptionElement.getFirstOMChild();
if (firstChild != null) {
firstChild.insertSiblingBefore(policyElement);
} else {
descriptionElement.addChild(policyElement);
}
}
}
代码示例来源:origin: org.apache.axis2/axis2-saaj
public SOAPElement addTextNode(String text) throws SOAPException {
Node firstChild = target.getFirstChild();
if (firstChild instanceof org.w3c.dom.Text) {
((org.w3c.dom.Text)firstChild).setData(text);
} else {
// Else this is a header
((OMNode)firstChild).insertSiblingBefore(this.omTarget.getOMFactory().createOMText(text));
}
return this;
}
代码示例来源:origin: apache/axis2-java
public SOAPElement addTextNode(String text) throws SOAPException {
Node firstChild = target.getFirstChild();
if (firstChild instanceof org.w3c.dom.Text) {
((org.w3c.dom.Text)firstChild).setData(text);
} else {
// Else this is a header
((OMNode)firstChild).insertSiblingBefore(this.omTarget.getOMFactory().createOMText(text));
}
return this;
}
代码示例来源:origin: org.apache.axis2/axis2-kernel
protected void addPoliciesToDefinitionElement(Iterator iterator,
OMElement definitionElement) throws Exception {
Policy policy;
OMElement policyElement;
OMNode firstChild;
for (; iterator.hasNext();) {
policy = (Policy) iterator.next();
policyElement = PolicyUtil.getPolicyComponentAsOMElement(policy,
serializer);
firstChild = definition.getFirstOMChild();
if (firstChild != null) {
firstChild.insertSiblingBefore(policyElement);
} else {
definitionElement.addChild(policyElement);
}
}
}
代码示例来源:origin: apache/axis2-java
protected void addPoliciesToDefinitionElement(Iterator iterator,
OMElement definitionElement) throws Exception {
Policy policy;
OMElement policyElement;
OMNode firstChild;
for (; iterator.hasNext();) {
policy = (Policy) iterator.next();
policyElement = PolicyUtil.getPolicyComponentAsOMElement(policy,
serializer);
firstChild = definition.getFirstOMChild();
if (firstChild != null) {
firstChild.insertSiblingBefore(policyElement);
} else {
definitionElement.addChild(policyElement);
}
}
}
代码示例来源:origin: org.apache.axis2/axis2-kernel
firstChild.insertSiblingBefore(policyElement);
} else {
descriptionElement.addChild(policyElement);
代码示例来源:origin: apache/axis2-java
firstChild.insertSiblingBefore(policyElement);
} else {
descriptionElement.addChild(policyElement);
代码示例来源:origin: org.apache.axis2/axis2-kernel
descriptionElement.addChild(policyRefElement);
} else {
firstChildElem.insertSiblingBefore(policyRefElement);
代码示例来源:origin: apache/axis2-java
descriptionElement.addChild(policyRefElement);
} else {
firstChildElem.insertSiblingBefore(policyRefElement);
代码示例来源:origin: org.apache.ws.commons.axiom/axiom-impl
while (node != null) {
if (node instanceof SOAPBody) {
node.insertSiblingBefore(child);
return;
代码示例来源:origin: org.paxml/paxml-core
public void visit(OMElement ele, String name, String value) {
if (filter == null || filter.accept(ele, name, value)) {
OMElement constEle = createDataTag(name, value, ele.getLineNumber());
if (firstPushedSub == null) {
OMNode firstChild = ele.getFirstOMChild();
if (firstChild != null) {
firstChild.insertSiblingBefore(constEle);
} else {
ele.addChild(constEle);
}
firstPushedSub = constEle;
} else {
firstPushedSub.insertSiblingAfter(constEle);
}
}
}
代码示例来源:origin: org.paxml/PaxmlCore
public void visit(OMElement ele, String name, String value) {
if (filter == null || filter.accept(ele, name, value)) {
OMElement constEle = createDataTag(name, value, ele.getLineNumber());
if (firstPushedSub == null) {
OMNode firstChild = ele.getFirstOMChild();
if (firstChild != null) {
firstChild.insertSiblingBefore(constEle);
} else {
ele.addChild(constEle);
}
firstPushedSub = constEle;
} else {
firstPushedSub.insertSiblingAfter(constEle);
}
}
}
代码示例来源:origin: org.apache.axis2/axis2-kernel
wsdlElement.addChild(policyRefElement);
} else {
firstChildElem.insertSiblingBefore(policyRefElement);
代码示例来源:origin: apache/axis2-java
wsdlElement.addChild(policyRefElement);
} else {
firstChildElem.insertSiblingBefore(policyRefElement);
内容来源于网络,如有侵权,请联系作者删除!