Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic; XML to JSON; XML sequence with 1 element to JSON Array.

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,
mooooooo ..... tiny ad ....
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!