Is there any option to change the format of how the XML is generated when using XML option from Export sets.

Ranjana Rathore
Kilo Explorer

When we generate an XML in ServiceNow, if there are no values for fields it adds only single XML tag like -
but when there are values it adds both open and close tags - true.
We need to generate the XSD's for the XML from ServiceNow and validate them. So because its not adding both open and close tags for the empty fields like this- we are not able to validate the XML.
Please let me know if you have any knowledge on this, how to change the XML format or version to get open and close tags for all the fields even if it is empty.

1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron

Hi

a "single tag" is not possible as the XML document would not be well-formed. Therefore I assume you mean a so-called "empty tag" and for this there are approaches on XSD side.

Refer to https://www.w3schools.com/xml/schema_complex_empty.asp

Maik