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

187
Vistas
Can xml2js generate multiple text nodes under one parent?

I'm trying to generate XML containing structures similar to the following:

<p>
  Some text ...
  <bold>Bold text</bold>
  ... some more text ...
  <italic>Italic text</italic>
  ... and yet more text.
</p>

What input to new xml2js.Builder().buildObject() will obtain this structure?

Note that the children of the p element are a mix of element nodes and text nodes, and occur in a specific order.

Background: This is JATS, not HTML. I'm modifying some existing code that produces XML for Crossref, and I have to add portions of JATS to the tree, a bit like this. If xml2js simply can't produce these structures I will seek another tool, but that would require a substantial refactoring, which I'd prefer to avoid.

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