How to extract all xml data (including xml tags) using Suitescript

  Kiến thức lập trình

Hope you can help. I am currently assessing the best way to extract ALL ‘OrderLevel’ tags (this would include both tags and values) from an XML file in SuiteScript 2.1.

Here’s an example snippet:


This is a very simple example of course. I was considering using a REGEX pattern, but I would rather a method that is considered best practice.

The whole goal of this exercise is to combine all tags from multiple XML files into one single XML file. To be clear, I do not want just the values, but also the tags.