Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

418
Visualizações
WARNING 'SimpleXMLElement::addChild(): unterminated entity reference

Trying to create xml file and get warning.

WARNING 'SimpleXMLElement::addChild(): unterminated entity reference Brantford Jonson'

so when i try to open xml file get error

This page contains the following errors:

error on line 3 at column 4: StartTag: invalid element name
Below is a rendering of the page up to the first error.,

i think my error is related with this php warning.

here is relevant code

  if ($value instanceof Zend_Config) {
       $child = $xml->addChild($key);
       $this->_addBranch($value, $child, $xml);
      } else {

          $xml->addChild($key, (string) $value);
             }

can you help me to pin point why this error occurs. Tried something like this

if ($value instanceof Zend_Config) {
     $child = $xml->addChild($key);
      $this->_addBranch($value, $child, $xml);
  } else {     
       $xml->$key((string) htmlspecilalchars($value));
      }
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I ran across the error when there was an ampersand "&" in my XML. Maybe try escaping the string with htmlspecialchars().

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda