JavaScrip code to loop/parse a string
$10-30 USD
Dibayar semasa penghantaran
I have this partial XML string taked from a DOM :
<ArticleIdList>
<ArticleId IdType="pubmed">26096938</ArticleId>
<ArticleId IdType="pii">onc2015238</ArticleId>
<ArticleId IdType="doi">10.1038/onc.2015.238</ArticleId>
<ArticleId IdType="pmc">PMC4688046</ArticleId>
<ArticleId IdType="mid">NIHMS694867</ArticleId>
</ArticleIdList>
And I want to end up with :
[{IdType: "pubmed", value: "26096938"},
{IdType: "pii", value: "onc2015238"},
{IdType: "doi", value: "10.1038/onc.2015.238"}
{IdType: "pmc", value: "PMC4688046"}
{IdType: "mid", value: "NIHMS694867"}]
The XML string may or MAYNOT have the same nodes each time so it cannot theow an error if one or more are missing. I would rather have code that loops the entire ArticleIdList reading each node rather than parseing the string with substrings. No PHP and no jQuery. This is going into a Quasar project so stright JavaScript, XML DOM is fine
ID Projek: #30366596
Tentang projek
8 pekerja bebas membida secara purata $26 untuk pekerjaan ini
Hi there. I will be glad to help you if you give me a chance. Please check my profile. Thanks.
Dear Sir, I can do this work in fast manner, I have sound good knowelde of js, while providing you solution I am going to provide you general solution not static type i.e. node name can vary and even node's number can Lagi
Hi I would like to work in your project, please if are interesting contact with me Regards.