import {CommentMatch, ElementMatch} from "../types"; import {CommentPatterns} from "../pattern/CommentPatterns"; export const XmlAreaService = { extractAllPureElements(xmlStr: string): ElementMatch[] { const rx = new RegExp(CommentPatterns.xml_element, "g"); let matches = []; let match : RegExpExecArray | null; while ((match = rx.exec(xmlStr)) !== null) { matches.push({ 'value': match[0], 'elementName': match[0].split(/[\t\s]+|>/)[0].replace(/^