Search in sources :

Example 1 with ChildIterator

use of org.hl7.fhir.validation.instance.utils.ChildIterator in project org.hl7.fhir.core by hapifhir.

the class InstanceValidator method listChildren.

public List<ElementInfo> listChildren(Element element, NodeStack stack) {
    // 1. List the children, and remember their exact path (convenience)
    List<ElementInfo> children = new ArrayList<ElementInfo>();
    ChildIterator iter = new ChildIterator(this, stack.getLiteralPath(), element);
    while (iter.next()) children.add(new ElementInfo(iter.name(), iter.element(), iter.path(), iter.count()));
    return children;
}
Also used : ElementInfo(org.hl7.fhir.validation.instance.utils.ElementInfo) ArrayList(java.util.ArrayList) ChildIterator(org.hl7.fhir.validation.instance.utils.ChildIterator)

Aggregations

ArrayList (java.util.ArrayList)1 ChildIterator (org.hl7.fhir.validation.instance.utils.ChildIterator)1 ElementInfo (org.hl7.fhir.validation.instance.utils.ElementInfo)1