I created a UBL node and now I want to save new nodes that depends to other information computed in others method, is it possible to add more nodes?
I tried with this code based in your example using save method, but it does't work :(
public function crear()
{
$xml = new drmad\semeele\Node('ext:UBLExtension');
$xml->child('ext:ExtensionContent')
->child('ds:Signature', ['Id' => 'Signature'])->save($data)
->child('ds:SignedInfo')
if($this->type =='Invoice'){
$data = $this->formato($data);
}
$data = $this->estandar($data);
return $xml->getXML();
}
private function formato($s)
{
return $s->child('ds:Reference');
}
private function estandar($s){
return $s->child('control:data');
}