Description
In `src/xml.zig`, `XmlParser.readContent` tracks nesting depth correctly but discards the closing tag name for nested elements (depth > 0):
```zig
// Closing tag of a nested element
depth -= 1;
self.advance(); self.advance(); // "</"
_ = self.readName(err_writer); // name read and discarded
```
This means `text` is accepted without error (content captured as raw XML, which is the intended behaviour for mixed/nested content).
For the primary use case of sql-pipe (row-based XML with plain text column values) this causes no data corruption — `depth == 0` closing tags are fully verified. The issue only surfaces for deeply-nested, malformed XML where the parser is silently lenient.
Acceptance Criteria
Notes
Requires an internal `ArrayList([]const u8)` stack inside `readContent`, allocated with the existing `allocator` parameter. No API changes needed.
Description
In `src/xml.zig`, `XmlParser.readContent` tracks nesting depth correctly but discards the closing tag name for nested elements (depth > 0):
```zig
// Closing tag of a nested element
depth -= 1;
self.advance(); self.advance(); // "</"
_ = self.readName(err_writer); // name read and discarded
```
This means `text` is accepted without error (content captured as raw XML, which is the intended behaviour for mixed/nested content).
For the primary use case of sql-pipe (row-based XML with plain text column values) this causes no data corruption — `depth == 0` closing tags are fully verified. The issue only surfaces for deeply-nested, malformed XML where the parser is silently lenient.
Acceptance Criteria
Notes
Requires an internal `ArrayList([]const u8)` stack inside `readContent`, allocated with the existing `allocator` parameter. No API changes needed.