getTagAs<T extends TagXml> method

T? getTagAs<T extends TagXml>(
  1. String tag,
  2. T constructor()
)

Returns a child node with the given tag as an instance of T.

If the child node does not exist, it returns null.

Implementation

T? getTagAs<T extends TagXml>(String tag, T Function() constructor) => mutate(getFirstChild(tag), constructor);