Merge MVP features #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "prototype"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR introduces the complete initial implementation of XNeedle,
a fault injection tool for XML documents, primarily targeting EtherCAT
SubDevice Information (ESI) files.
Parser
.xnDSL parser using SpracheRuleObject— XPath-selected node blocks:$("//xpath") { ... }BangObject— named operations with arguments:!add("Tag") { ... }ExpressionPart— arithmetic, string concat, and function call expressions#single-line comment support via preprocessing (quote-aware, preserves line numbers)Transformation
Rule— applies a block of operations to all XPath-matched nodesBang— dispatches to a registeredBangOperationby nameBangOperationregistry with automatic discovery via reflectionBuilt-in Bang Operations
!add(tag)— add a child element, body operates on new node!before(tag)— insert a sibling element before the current nodeBuilt-in Context Functions
text()/text(value)— get/set element text contentcdata()/cdata(value)— get/set CDATA sectionattr(name)/attr(name, value)— get/set attributesrename(newName)/rename(select, newName)— rename elements or attributesremove(select)— remove matched nodescrc()— calculate CRC32 of the current node's subtreehex(value)— format a number as uppercase hex stringTooling
linux-x64asxnxn <file.xn> -i input.xml -o output.xml