class XmlService method .parse()

XmlService is the Apps Script service.

.parse() is the method name you will see after a dot in your code.

What it does

Parses an XML string into a document object.

Why it's used

  • Read XML feeds or legacy API responses.
  • Turn supplier or government XML into something you can loop over.

Common errors

  • Forgetting parentheses on parse. Write XmlService.parse(), not XmlService.parse or parse by itself.
  • Skipping dots between chained calls. Each step needs a dot, like XmlService.parse().
  • Adding spaces where they do not belong. Write XmlService.parse(), not XmlService .parse(), XmlService.parse (), or XmlService . parse().
  • Wrong capitalization. Use XmlService and parse, not xmlservice or parse.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.