need help with xml request post body

Cerrado Publicado hace 5 años Pagado a la entrega
Cerrado Pagado a la entrega

I need someone to quickly tell me how to convert pretty xml like :

<?xml version = "1.0" encoding = "utf-8"?>

<!-- [login to view URL] -->

<?xml-stylesheet type = "text/xsl" href = "[login to view URL]" ?>

<plane>

<year> 1977 </year>

<make> Cessna </make>

<model> Skyhawk </model>

<color> Light blue and white </color>

</plane>

to this in nodejs :

'<?xml version = "1.0" encoding = "utf-8"?>\n<!-- [login to view URL] -->\n<?xml-stylesheet type = "text/xsl" href = "[login to view URL]" ?>\n<plane>\n <year> 1977 </year>\n <make> Cessna </make>\n <model> Skyhawk </model>\n <color> Light blue and white </color>\n</plane>'

So that I can use it to send POST request to an API.

important : it must be in nodejs

Express JS JavaScript Node.js XML

Nº del proyecto: #18607820

Sobre el proyecto

6 propuestas Proyecto remoto Activo hace 5 años

6 freelancers están ofertando un promedio de ₹1025 por este trabajo

vano101

Нello Looks like it's pretty simple, there is just needed to insert \n just after end of each line. But I have follow question? How will you test? How can you make sure result is correct? Thanks.

₹600 INR en 1 día
(131 comentarios)
5.8
mateenirshad

Hello, This could be achieved in a lot of ways depending on the source e.g. 1. use a regular expression to remove white space and replace \r\n and \n with \n. 2. require a library to parse xml. Call it's parser wi Más

₹600 INR en 1 día
(32 comentarios)
5.1
deepthi2889

Hi,  I am a Full stack developer in Microsoft technologies.  My area of expertise is web application development (asp.Net web forms, MVC, classic ASP), web services (SOAP & RESTFul), MySql & Sql Server as back end ( Más

₹2250 INR en 1 día
(14 comentarios)
5.0
AntonBliznetc

Hello, i can do it in 1-2 hours. please send source code. i return result. i can use team-viewer, if need. Pay only after complete

₹1250 INR en 0 días
(9 comentarios)
2.5