Documentation / @sw-file-lib/xml / xml-schema / SchemaPath
Type Alias: SchemaPath
ts
type SchemaPath = readonly (string | number)[];Defined in: packages/xml/src/xml-schema/types.ts:79
A path identifying a value in the parsed JavaScript object.
Each segment is either an object property name or a zero-based array index. Unlike SwXmlPath, this path represents the structure of the parsed value rather than the structure of the XML document.
Example
For a parsed value such as:
ts
{
root: {
items: [
{ name: "foo" },
{ name: "bar" },
],
},
}the path to "bar" is:
ts
["root", "items", 1, "name"]