import { XMLBuilder , XMLParser } from 'fast-xml-parser' ; const xml2obj = ( raw ) : Record < string , unknown > => new XMLParser ( { numberParseOptions : { hex : true , leadingZeros : true , skipLike : /^\S+=$/ } } ) . parse ( raw ) ; const xml = ( data ) : string => new XMLBuilder ( { ignoreAttributes : false , processEntities : false } ) . build ( data ) ; export { xml , xml2obj } ;