I am trying to parse a simple config file with minimized Boolean attributes and the DOMDocument is not having it. I am trying to load the following:
<config>
<text id='name' required>
<label>Name:</label>
</text>
</config>
with the following code
$dom = new DOMDocument();
$dom->preserveWhiteSpace=FALSE;
if($dom->LoadXML($template) === FALSE){
throw new Exception("Could not parse template");
}
I am getting a warning that
Warning: DOMDocument::loadXML(): Specification mandate value for attribute required in Entity, line: 2
Am I missing a flag or something to get DOMDocument to parse the minimum boolean attribute?