Buscar

What is the correct way to load an XML file using the DOM API in PHP? $load = new DOMDocument(); $load->load('/path/to/file.xml'); $loadHtml = ne...

What is the correct way to load an XML file using the DOM API in PHP?


$load = new DOMDocument(); $load->load('/path/to/file.xml');
$loadHtml = new DOMDocument(); $loadHtml->loadHTML('

Hello


');
$loadHtmlFile = new DOMDocument(); $loadHtmlFile->loadHTMLFile('/path/to/file.html');

💡 1 Resposta

User badge image

Ed Verified user icon

A maneira correta de carregar um arquivo XML usando a API DOM em PHP é: $load = new DOMDocument(); $load->load('/caminho/para/o/arquivo.xml'); Isso criará um objeto DOMDocument e carregará o arquivo XML especificado no caminho fornecido.

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais