need help with xml request post body

Kapalı İlan edilme: 5 yıl önce Teslim sırasında ödenir
Kapalı Teslim sırasında ödenir

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

Proje NO: #18607820

Proje hakkında

6 teklif Uzak proje Aktif 5 yıl önce

Bu iş için 6 freelancer ortalamada ₹1025 teklif veriyor

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.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% INR
(131 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% INR
(32 Değerlendirme)
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 ( Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% INR
(14 Değerlendirme)
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 in 0 gün içinde
(9 Değerlendirme)
2.5