MCPcopy Index your code
hub / github.com/ionic-team/capacitor / parseXML

Function parseXML

cli/src/util/xml.ts:17–26  ·  view source on GitHub ↗
(xmlStr: string, options?: xml2js.OptionsV2)

Source from the content-addressed store, hash-verified

15}
16
17export function parseXML(xmlStr: string, options?: xml2js.OptionsV2): any {
18 const parser = options !== undefined ? new xml2js.Parser({ ...options }) : new xml2js.Parser();
19 let xmlObj;
20 parser.parseString(xmlStr, (err: any, result: any) => {
21 if (!err) {
22 xmlObj = result;
23 }
24 });
25 return xmlObj;
26}
27
28export async function writeXML(object: any): Promise<any> {
29 return new Promise((resolve) => {

Callers 3

logiOSPlistFunction · 0.90
containsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected