Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic; XML to JSON; XML sequence with 1 element to JSON Array.  RSS feed

a bbb
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using the Java implementation of with sources here:

I have a problem converting a sequence of elements.
Sometimes my sequence has 1 element and other times it has several.

Is transformed to


Is transformed to

My method is

How can I instruct the XML.toJSONObject(xmlText)
that XML element <contractLine> Must be an Array?

I searched the web,
read the documentation
but I did not find a suitable approach for this library.

Thank you,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!