getChildren method

List<XmlElement>? getChildren(
  1. String elementName,
  2. {int start = 0,
  3. int? stop}
)

Returns all direct children named elementName.

start and stop refer to the indexes of the identified elements. Only matches found between start and stop will be returned. start must not be null and must be >= 0. stop may be null, but must be >= start if provided.

Returns null if no element can be found.

Implementation

List<XmlElement>? getChildren(
  String elementName, {
  int start = 0,
  int? stop,
}) {
  assert(elementName.isNotEmpty);
  assert(start >= 0);
  assert(stop == null || stop >= start);
  return getElementsWhere(
      name: elementName, start: start, stop: stop, global: false);
}