Converting XML to JSON in C

Possible duplicate:
JSON ↔ XML in C / C ++

Is there a C function or simple C library to convert XML to JSON?

For example, I would like the function to be able to transform the following:

<?xml version="1.0" encoding="UTF-8"?>
<reqTransDetails>
        <token>6xPVIl83hgyhtwZ/y0azu9MwMCQVSIVj/qM=</token>
        <ordering>desc</ordering>
        <status>A</status>
        <blockSize>999</blockSize>
    <blockNo>0</blockNo>
</reqTransDetails>

      

To:

{
  "reqTransDetails": {
    "token": "6xPVIl83hgyhtwZ/y0azu9MwMCQVSIVj/qM=",
    "ordering": "desc",
    "status": "A",
    "blockSize": "999",
    "blockNo": "0"
  }
}

      

Thank you for your help.

+3


source to share





All Articles