本文整理了Java中org.apache.axiom.om.OMElement.getChildrenWithName()
方法的一些代码示例,展示了OMElement.getChildrenWithName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OMElement.getChildrenWithName()
方法的具体详情如下:
包路径:org.apache.axiom.om.OMElement
类名称:OMElement
方法名:getChildrenWithName
暂无
代码示例来源:origin: holodeck-b2b/Holodeck-B2B
/**
* Gets an {@link Iterator} for the <code>eb:UserMessage</code> elements from the given ebMS 3 Messaging header in
* the SOAP message.
*
* @param messaging The SOAP Header block that contains the ebMS header,i.e. the <code>eb:Messaging</code> element
* @return An {@link Iterator} for all {@link OMElement}s representing a <code>eb:UserMessage</code>
* element in the given header
*/
public static Iterator<OMElement> getElements(final OMElement messaging) {
return messaging.getChildrenWithName(Q_ELEMENT_NAME);
}
代码示例来源:origin: holodeck-b2b/Holodeck-B2B
/**
* Gets an {@link Iterator} for all <code>PartInfo</code> children of the given parent <code>PayloadInfo</code>
* element.
*
* @param plElement The parent <code>PayloadInfo</code> element
* @return An {@link Iterator} for all {@link OMElement}s representing a <code>PartInfo</code>
* child element of given element, or<br>
* <code>null</code> when no such element is not found as child of the given element.
*/
public static Iterator<OMElement> getElements(final OMElement plElement) {
return plElement.getChildrenWithName(Q_ELEMENT_NAME);
}
代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core
@SuppressWarnings("unchecked")
private static Iterator<OMElement> getSQLQueryElements (OMElement queryEl) {
return queryEl.getChildrenWithName(new QName(DBSFields.SQL));
}
代码示例来源:origin: org.apache.axis2/axis2-adb
public static ArrayList getArrayList(OMElement element, String localName) {
Iterator childitr = element.getChildrenWithName(new QName(localName));
ArrayList list = new ArrayList();
while (childitr.hasNext()) {
Object o = childitr.next();
list.add(o);
}
return list;
}
代码示例来源:origin: org.apache.axis2/axis2-adb
public static HashSet getHashSet(OMElement element, String localName) {
Iterator childitr = element.getChildrenWithName(new QName(localName));
final HashSet list = new HashSet();
while (childitr.hasNext()) {
OMElement o = (OMElement) childitr.next();
list.add(o.getText());
}
return list;
}
代码示例来源:origin: org.wso2.carbon.event-processing/org.wso2.carbon.event.processor.core
private static List<String> getStreamDefinitions(OMElement streamsElement) {
List<String> streamDefinitions = new ArrayList<String>();
Iterator<OMElement> streamIterator = streamsElement.getChildrenWithName(new QName("stream"));
while (streamIterator.hasNext()) {
OMElement streamElement = streamIterator.next();
String streamDefinition = streamElement.getText();
streamDefinitions.add(streamDefinition);
}
return streamDefinitions;
}
代码示例来源:origin: org.apache.axis2/axis2-saaj
public Iterator getChildElements(QName qname) {
Iterator childIter = omTarget.getChildrenWithName(qname);
Collection childElements = new ArrayList();
while (childIter.hasNext()) {
childElements.add(toSAAJNode((org.w3c.dom.Node)childIter.next()));
}
return childElements.iterator();
}
private void processAmrMappings(OMElement amrMapElement) {
Iterator<OMElement> children = amrMapElement.getChildrenWithName(METHOD_REF_QNAME);
for (int i = 0; children.hasNext(); i++) {
OMElement child = children.next();
processAmrEntry(child, amrInternalToExternalMap, amrExternalToInternalMap);
}
}
代码示例来源:origin: apache/axis2-java
public Iterator getChildElements(QName qname) {
Iterator<OMElement> childIter = omTarget.getChildrenWithName(qname);
Collection childElements = new ArrayList();
while (childIter.hasNext()) {
childElements.add(toSAAJNode((org.w3c.dom.Node)childIter.next()));
}
return childElements.iterator();
}
代码示例来源:origin: stackoverflow.com
OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(stream);
OMElement documentElement = builder.getDocumentElement();
Iterator it = documentElement.getChildrenWithName(new QName("http://namespace", "elementName"));
if (it.hasNext()) {
it.next();
it.remove();
}
代码示例来源:origin: apache/axis2-java
public Iterator getChildElements(Name name) {
QName qName = new QName(name.getURI(), name.getLocalName());
Iterator<OMElement> childIter = omTarget.getChildrenWithName(qName);
Collection childElements = new ArrayList();
while (childIter.hasNext()) {
childElements.add(toSAAJNode((org.w3c.dom.Node)childIter.next()));
}
return childElements.iterator();
}
代码示例来源:origin: org.wso2.ei/admin-clients
public List<String> getScheduleTaskList() throws RemoteException, TaskManagementException {
ArrayList<String> taskList = new ArrayList();
OMElement tasksOme = getAllTaskDescriptions().getFirstElement();
if (tasksOme != null) {
Iterator<OMElement> itr = tasksOme.getChildrenWithName(new QName("task"));
while (itr.hasNext()) {
OMElement taskOme = itr.next();
taskList.add(taskOme.getAttributeValue(new QName("name")));
}
}
return taskList;
}
代码示例来源:origin: org.apache.axis2/axis2-saaj
public Iterator getChildElements(Name name) {
QName qName = new QName(name.getURI(), name.getLocalName());
Iterator childIter = omTarget.getChildrenWithName(qName);
Collection childElements = new ArrayList();
while (childIter.hasNext()) {
childElements.add(toSAAJNode((org.w3c.dom.Node)childIter.next()));
}
return childElements.iterator();
}
代码示例来源:origin: org.wso2.esb/admin-clients
public List<String> getScheduleTaskList() throws RemoteException, TaskManagementException {
ArrayList<String> taskList = new ArrayList();
OMElement tasksOme = getAllTaskDescriptions().getFirstElement();
if (tasksOme != null) {
Iterator<OMElement> itr = tasksOme.getChildrenWithName(new QName("task"));
while (itr.hasNext()) {
OMElement taskOme = itr.next();
taskList.add(taskOme.getAttributeValue(new QName("name")));
}
}
return taskList;
}
代码示例来源:origin: magja/magja
@SuppressWarnings("unchecked")
private Map<String, Object> getMap(OMElement items) {
Map<String, Object> map = new HashMap<String, Object>();
for (Iterator<OMElement> iElem = items.getChildrenWithName(ITEM_NAME); iElem.hasNext();) {
OMElement elem = iElem.next();
String key = elem.getFirstChildWithName(KEY_NAME).getText();
map.put(key, getValue(elem.getFirstChildWithName(VALUE_NAME)));
}
return map;
}
代码示例来源:origin: org.apache.axis2/axis2-transport-base
public URLEndpointsConfiguration create(OMElement element) throws AxisFault {
Iterator iterator = element.getChildrenWithName(new QName(URLEndpointsConfiguration.ENDPOINT));
URLEndpointsConfiguration configuration = new URLEndpointsConfiguration();
URLEndpointFactory fac = new URLEndpointFactory();
while (iterator.hasNext()) {
OMElement endpoint = (OMElement) iterator.next();
URLEndpoint epr = fac.create(endpoint);
configuration.addEndpoint(epr);
}
return configuration;
}
代码示例来源:origin: apache/axis2-java
public URLEndpointsConfiguration create(OMElement element) throws AxisFault {
Iterator<OMElement> iterator = element.getChildrenWithName(new QName(URLEndpointsConfiguration.ENDPOINT));
URLEndpointsConfiguration configuration = new URLEndpointsConfiguration();
URLEndpointFactory fac = new URLEndpointFactory();
while (iterator.hasNext()) {
OMElement endpoint = iterator.next();
URLEndpoint epr = fac.create(endpoint);
configuration.addEndpoint(epr);
}
return configuration;
}
代码示例来源:origin: org.wso2.xkms/xkms
public XKMSElement buildElement(OMElement element) throws XKMSException {
RevokeResult revokeResult = new RevokeResult();
super.buildElement(element, revokeResult);
OMElement keyBindingElem;
for (Iterator iterator = element
.getChildrenWithName(XKMS2Constants.ELE_KEY_BINDING); iterator
.hasNext();) {
keyBindingElem = (OMElement) iterator.next();
revokeResult.addKeyBinding((KeyBinding) KeyBindingBuilder.INSTANCE
.buildElement(keyBindingElem));
}
return revokeResult;
}
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.reporting.template.core
private void setCategoryExpr(String XField, OMElement categorySeriesElement, String xExpressionText)
throws JaxenException {
Iterator iter = categorySeriesElement.getChildrenWithName(new QName(xExpressionText));
OMElement aCatExpr = (OMElement) iter.next();
aCatExpr.setText("");
OMFactory factory = document.getOMFactory();
OMText cdataField = factory.createOMText(aCatExpr, "$F{" + XField + "}", OMText.CDATA_SECTION_NODE);
aCatExpr.addChild(cdataField);
}
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.reporting.template.core
private void setValueExpr(String YField, OMElement categorySeriesElement, String yExpressionText)
throws JaxenException {
Iterator iter = categorySeriesElement.getChildrenWithName(new QName(yExpressionText));
OMElement aValueExpr = (OMElement) iter.next();
aValueExpr.setText("");
OMFactory factory = document.getOMFactory();
OMText cdataField = factory.createOMText(aValueExpr, "$F{" + YField + "}", OMText.CDATA_SECTION_NODE);
aValueExpr.addChild(cdataField);
}
内容来源于网络,如有侵权,请联系作者删除!