MCPcopy Index your code
hub / github.com/simstudioai/sim / child

Method child

apps/sim/lib/pptx-renderer/parser/xml-parser.ts:35–44  ·  view source on GitHub ↗

* Find the first child element matching the given localName (namespace-agnostic). * Returns an empty SafeXmlNode if not found, so chaining never crashes.

(localName: string)

Source from the content-addressed store, hash-verified

33 * Returns an empty SafeXmlNode if not found, so chaining never crashes.
34 */
35 child(localName: string): SafeXmlNode {
36 if (!this.el) return new SafeXmlNode(null)
37 const children = this.el.children
38 for (let i = 0; i < children.length; i++) {
39 if (children[i].localName === localName) {
40 return new SafeXmlNode(children[i])
41 }
42 }
43 return new SafeXmlNode(null)
44 }
45
46 /**
47 * Get child elements, optionally filtered by localName (namespace-agnostic).

Callers 15

resolveShapeBlipUrlFunction · 0.80
getLineEndsFromLnFunction · 0.80
renderShapeFunction · 0.80
findStyleAtLevelFunction · 0.80
findPlaceholderNodeFunction · 0.80
getPlaceholderLstStyleFunction · 0.80
mergeParagraphPropsFunction · 0.80
mergeRunPropsFunction · 0.80
resolveGradientForTextFunction · 0.80
renderTextBodyFunction · 0.80
renderImageFunction · 0.80
resolveBlipOpacityFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected