Skip to content

Documentation / @sw-file-lib/xml / xml-schema / SchemaParseContext

Interface: SchemaParseContext ​

ts
interface SchemaParseContext {
  readonly xmlPath: SwXmlPath;
  readonly root: SwXmlNodeList;
  readonly element: SwXmlNode | undefined;
  readonly schemaPath: SchemaPath;
}

Defined in: packages/xml/src/xml-schema/parseOptions.ts:7

Context information provided to schema parsing callbacks.

Properties ​

PropertyModifierTypeDescription

xmlPath

readonly

SwXmlPath

The path to the XML element where the issue was detected.

The path identifies the element currently being parsed, rather than the specific attribute or child element that caused the issue.

root

readonly

SwXmlNodeList

The root of the XML tree currently parsing.

element

readonly

SwXmlNode | undefined

The XML element currently being parsed.

schemaPath

readonly

SchemaPath

The path to the field in parsed JavaScript object where the issue was detected.