requireAttr
fn
string requireAttr(XmlElement elem, string attrName,
string location = "")Retrieves a required attribute value from an element.
Parameters
elem | The element to read the attribute from. |
attrName | The attribute name. |
location | Optional location string for diagnostics. Defaults to `""`. |
Returns
The attribute value as a string.
Throws
OdfXmlException when the attribute is missing or empty.