Configures whether the decoded result should be considered as a collection or as a single element.
public function withAsCollection(?bool $asCollection) : static { return $this->with(XmlEncoder::AS_COLLECTION, $asCollection); }