Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!