Questions tagged [xml-to-json]
82 questions
1
vote
0 answers
Is it possible to customize Json element's Datatype as per Json schema?
Converting XML to JSON through StAXON parser, there are datatype mismatch between Json Schema (expected) and actual Response JSON
For ex:
As per Swagger Schema, we are expecting a “String” value for a field but XML to JSON parser gives us…

Maharajan
- 11
- 5
1
vote
0 answers
How to create a SOAP Request BODY from JSON?
I have created a node.js application to create a SOAP Request BODY from a JSON object. I have the following code
var convert = require('xml-js');
var xml = `

Abdul Manaf
- 4,933
- 8
- 51
- 95
1
vote
0 answers
How to convert one element in XML to Json Array when only one element exists in xml
I'm trying to convert XML to JSON using the org.JSON library. However, when there is only one element in XML, it's unable to convert the element as an Array.
source.xml
user1
Code for conversion:
File xml= new…

user5245939
- 11
- 3
1
vote
1 answer
xml-flow NPM package - Unexpected XML Parsing Behaviour
Background
I am using xml-flow npm package to parse XML using streams. Issue is that the xml nodes are getting parsed in an unexpected way.
My intention is to parse a huge XML file using a repeating xml node. The XML file can be any URL and the…

planet_hunter
- 3,866
- 1
- 26
- 39
1
vote
2 answers
Root tag missing after converting XML to JSON and saving to disk
I'm attempting create a simple XML to JSON converter, reading from one folder and outputting to another. This process seems to be working okay, but I just cannot seem to get this thing to include the root tag of the XML. Please find samples…

BernardV
- 640
- 10
- 28
1
vote
1 answer
Book info Goodreads API
Trying to do a search on the Goodreads API for book information. At the same time I'm trying to convert the data from xml to json. I get this error when I do a search for a book
No 'Access-Control-Allow-Origin' header is present on the requested…

mwlai
- 71
- 1
- 9
0
votes
2 answers
Is there an Oracle built in function that converts XML to JSON where the XML format varies?
Using Oracle 12.2
Goal: Convert XML data in a CLOB to JSON
Desire: Use built in functionality of Oracle (does it even exist?)
I'm under the impression that Oracle CAN convert the XML to JSON on it's own. However, I am unable to find a straight…

edjm
- 4,830
- 7
- 36
- 65
0
votes
0 answers
Using Apache NiFi to extract data contained within XML TAG
I relatively new to NiFi, and I working on a small project that's using some airport data. I've gotten to a point where I want to extract specific pieces of the data and I've managed to use a validate Xpath processor to extract some element values…

Jeremy M
- 1
0
votes
0 answers
Convert xml to json then download json file
I am currently using xml parser to convert xml to json.i want to convert xml to json then download json file. My xml is in the form of
const xml1 = `

Shanu k k
- 1,235
- 2
- 18
- 43
0
votes
1 answer
XSLT to convert a XML to JSON which may have multiple repeated nodes
I want to convert a XML to JSON using XSLT. But I am facing few issues.
Input XML
123
123

techresearch
- 119
- 3
- 14
0
votes
1 answer
How to convert below XML to Java Object in Java
I want to read the values under value tag
i.e. Yes, 750,3500, AL,Real, Approved, G, 140, GT these values i want to map with java object.
AL

Ramanuj
- 123
- 1
- 13
0
votes
1 answer
Receiving the error TypeError: Parse buffer must be String or Buffer
I've been getting the follow error in my nodejs api project. It does web scraping of a phone app web address.
C:\Program Files\GiustiziaCivileAPI-master\code\node_modules\node-expat\lib\node-expat.js:23
return this.parser.parse(buf,…

user18918352
- 11
- 3
0
votes
0 answers
Is it possible to calling OData4 service with post request containing xml body?
I have an xml body and I want to invoke the "odata" web server by sending a post request. But when I edit the content-type with application/xml or application/atom+xml, I get the error message "invalid json type for an entity". Is it possible to…

Emir S.
- 1
- 1
0
votes
0 answers
Using map policy getting all the array elements except one 'valueOf' in api connect
Using map policy trying to map array elements but only 'valuOf' is not reflecting in the response

Vidya
- 1
0
votes
1 answer
Error in parsing xml Response in react (nextjs)
I am working on a personal project and thought I would make a rest API that responds in json and xml both, everything on the json side works but when I get a response in xml. Everything fails and I get this error on console when I get the response…

Van Wilder
- 444
- 4
- 14