Repository navigation
Add XML parser (Nessus/OpenVAS, SOAP, configs) - #43
Conversation
New XmlParser in ax-normalize. XML is a tree, so we flatten to rows by finding the record element: the most-repeated group of sibling elements (e.g. <ReportItem> under a Nessus <ReportHost>, or <vuln> in a report; first group in document order on a tie). Each becomes a row whose columns are its attributes plus its leaf child elements (text-only children), type-inferred; a child with its own children is not flattened. With no repetition the document is a single record and the root element becomes one row. Flattened this way it feeds structural and dist like any other corpus. Uses roxmltree (lightweight, pure-Rust, deterministic read-only DOM). Detected by an <?xml declaration (STRONG) or a leading element tag (TEXT; <digit is a syslog priority, not XML); extensions .xml/.nessus. Malformed XML is a clean Parse error. Mutation gate: 0 surviving mutants on the new file. Closes #20 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds an XML parser to ChangesXML Parser Implementation
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implements the XML plugin — issue #20.
What
XML is a tree, so
XmlParserflattens it to rows by finding the recordelement: the most-repeated group of sibling elements (e.g.
<ReportItem>undera Nessus
<ReportHost>, or<vuln>in a report; first group in document orderon a tie). Each becomes a row whose columns are its attributes plus its
leaf child elements (text-only children), type-inferred; a child that has its
own children is not flattened. With no repetition the document is a single record
and the root element becomes one row.
Flattened this way it feeds
structuralanddistlike any other corpus — andunlocks the XML-based security formats (Nessus/OpenVAS scan reports, SOAP).
Dependency
roxmltree— lightweight, pure-Rust, deterministic read-only DOM (kept in thetext-only build).
Routing
<?xmldeclaration (STRONG) or a leading element tag(
TEXT;<+ digit is a syslog priority, not XML)..xml/.nessus.Errors
Malformed XML is a clean
AxError::Parse.Gates
fmt/clippy -D warnings/ full workspace tests green (both feature sets).xml.rs(the tie-break and theleaf/non-leaf distinction are both pinned by tests).
xmland an anomalous port isflagged (exit 1).
Closes #20
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
.xmland.nessusfile extensions