MCPcopy
hub / github.com/callstack/agent-device / readOpeningTag

Method readOpeningTag

src/utils/xml.ts:105–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103 }
104
105 private readOpeningTag(): void {
106 this.index += 1;
107 this.skipWhitespace();
108 const name = this.readRequiredName(`Missing XML tag name at offset ${this.index}.`);
109 const { attributes, selfClosing } = this.readOpeningTagBody();
110
111 const node: XmlNode = { name, attributes, text: null, children: [] };
112 this.addNode(node);
113 if (!selfClosing) {
114 this.pushOpenNode(node);
115 }
116 }
117
118 private readOpeningTagBody(): { attributes: Record<string, string>; selfClosing: boolean } {
119 const attributes: Record<string, string> = {};

Callers 1

resolveMarkupReaderMethod · 0.95

Calls 5

skipWhitespaceMethod · 0.95
readRequiredNameMethod · 0.95
readOpeningTagBodyMethod · 0.95
addNodeMethod · 0.95
pushOpenNodeMethod · 0.95

Tested by

no test coverage detected