getElement method
XmlElement?
getElement(
- String name, {
- @Deprecated('Use `namespaceUri` instead') String? namespace,
- String? namespaceUri,
inherited
Return the first child element with the given name, or null.
Both name and namespaceUri can be a specific String; or '*' to
match anything. If no namespace is provided, the fully qualified name
is compared; otherwise only the local name is considered.
For example:
element.getElement('xsd:name')returns the first element with the fully qualified tag namexsd:name.element.getElement('name', namespaceUri: '*')returns the first element with the local tag namenameno matter the namespace.element.getElement('*', namespaceUri: 'http://www.w3.org/2001/XMLSchema')returns the first element within the provided namespace URI.
Implementation
XmlElement? getElement(
String name, {
@Deprecated('Use `namespaceUri` instead') String? namespace,
String? namespaceUri,
}) => null;