Skip to main content
Version: v0.0.3

Function: positionOf()

positionOf(el): CcdaPosition

Build a PHI-free structural position for an element, its local name as a path hint plus the locator line/column @xmldom/xmldom recorded (when present). Never includes attribute values or text content.

Parameters

el

Element

Returns

CcdaPosition

Example

import { positionOf } from "@cosyte/ccda";
const pos = positionOf(sectionEl); // { path: "section", line: 42, ... }