Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

155
Vistas
indexOf or search function issue for XML tag to get the value

I have a big XML with unique XML tag which is coming as string

I want to extract the value of an XML element

I tried the following

a. xmlString.substring(this.responseText.search('<emp:keyAddress>')+5, this.responseText.search('</emp:keyAddress>'))
b. xmlString.substring(this.responseText.indexOf('<emp:keyAddress>')+5, this.responseText.indexOf('</emp:keyAddress>'))

I am getting the following issues

a. Referenced to undeclared namespace prefix: 'emp'
b. Problem creating XSL transformer for string

How to get the value of an XML tag using Javascript? I don't like neither searchText or indexOf where i need to hard-code the length as it may differs in the future

Please advise.

Thanks

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda