diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-22 03:33:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-22 03:33:31 +0900 |
| commit | 338592f2765b60df40509920b1ebd97b076f55c7 (patch) | |
| tree | 608bb86068fb734cd6a3e9ae06bcad236fbc0834 /crates/shirabe-php-shim/src/lib.rs | |
| parent | 9506cfafe29417a5c4149cf618f7e8c79d463e4e (diff) | |
| download | php-shirabe-338592f2765b60df40509920b1ebd97b076f55c7.tar.gz php-shirabe-338592f2765b60df40509920b1ebd97b076f55c7.tar.zst php-shirabe-338592f2765b60df40509920b1ebd97b076f55c7.zip | |
feat(php-shim): add DOMDocument/DOMNode XML shim
Implements a minimal, PHP-compatible subset of \DOMDocument, \DOMNode and
\DOMNodeList for use by Symfony's XmlDescriptor. save_xml mirrors libxml2's
formatOutput serialization (XML declaration, 2-space indent, self-closing
empty elements, and no pretty-printing of text-bearing elements) and writes
to a std::io::Write sink. Verified byte-for-byte against real PHP libxml.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim/src/lib.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index 0d7f8ef..10e89fe 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -22,6 +22,7 @@ mod stream; mod string; mod url; mod var; +mod xml; mod zip; pub use array::*; @@ -48,6 +49,7 @@ pub use stream::*; pub use string::*; pub use url::*; pub use var::*; +pub use xml::*; pub use zip::*; use indexmap::IndexMap; |
