¿Qué debo hacer para agregar texto a un elemento XML? Por ejemplo:php DomDocument innerText
<videoTitle>I want to add text here</videoTitle>
He creado el DOMDocument y he comenzado a agregar los elementos. Aquí está el elemento al que necesito agregar el texto.
$title = $vitals->appendChild($X->createElement("title"));
Hola, genial, gracias. Por cierto, ¿hay alguna forma en PHP para agregar automáticamente las etiquetas ? –
@Lee No hay problema. Eche un vistazo a ['DOMDocument :: createCDATASection'] (http://php.net/manual/en/domdocument.createcdatasection.php). – lonesomeday