import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.annotation.Nullable;
import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
import org.opendaylight.controller.netconf.util.exception.MissingNameSpaceException;
import org.opendaylight.controller.netconf.util.exception.UnexpectedElementException;
return Lists.newArrayList(Collections2.filter(getChildElementsWithinNamespace(namespace),
new Predicate<XmlElement>() {
@Override
- public boolean apply(@Nullable XmlElement xmlElement) {
+ public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
});
}
+ /**
+ *
+ * @param tagName tag name without prefix
+ * @return
+ */
public List<XmlElement> getChildElements(final String tagName) {
return getChildElementsInternal(new ElementFilteringStrategy() {
@Override
public boolean accept(Element e) {
- return e.getTagName().equals(tagName);
+ // localName returns pure localName without prefix
+ return e.getLocalName().equals(tagName);
}
});
}
List<XmlElement> children = getChildElementsWithinNamespace(namespace);
children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
@Override
- public boolean apply(@Nullable XmlElement xmlElement) {
+ public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
List<XmlElement> children = getChildElementsWithinNamespace(getNamespace());
return Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
@Override
- public boolean apply(@Nullable XmlElement xmlElement) {
+ public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));