How to read xml attachments in script

Tadz
Tera Guru
Tera Guru

Hi Everyone,

Is there a way to read an XML attachment to code?

There is an available GlideExcelParser to read excel attachment.

I was hoping if there is also for XML attachments.

 

Thanks,

Tadz

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Tadz 

You can read XML data using XML Document class available.

For reading Excel there is GlideExcelParser.

But nothing for XML as of now other than XML Document

XMLDocument script object

XMLDocument2

There is this XMLHelper which would convert your XML into javascript object. Then you can use JSON parser to parse it.

XMLHelper

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Tadz 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Tadz 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Tadz 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader