RazrFalcon / Xmlparser
Licence: other
A low-level, pull-based, zero-allocation XML 1.0 parser.
Stars: ✭ 73
Programming Languages
rust
11053 projects
Projects that are alternatives of or similar to Xmlparser
Parse Xml
A fast, safe, compliant XML parser for Node.js and browsers.
Stars: ✭ 184 (+152.05%)
Mutual labels: xml, parser
Oga
Read-only mirror of https://gitlab.com/yorickpeterse/oga
Stars: ✭ 1,147 (+1471.23%)
Mutual labels: xml, parser
Posthtml
PostHTML is a tool to transform HTML/XML with JS plugins
Stars: ✭ 2,737 (+3649.32%)
Mutual labels: xml, parser
Omniparser
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
Stars: ✭ 148 (+102.74%)
Mutual labels: xml, parser
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+939.73%)
Mutual labels: xml, parser
Xml2lua
XML Parser written entirely in Lua that works for Lua 5.1+. Convert XML to and from Lua Tables 🌖💱
Stars: ✭ 150 (+105.48%)
Mutual labels: xml, parser
Hquery.php
An extremely fast web scraper that parses megabytes of invalid HTML in a blink of an eye. PHP5.3+, no dependencies.
Stars: ✭ 295 (+304.11%)
Mutual labels: xml, parser
Meeseeks
An Elixir library for parsing and extracting data from HTML and XML with CSS or XPath selectors.
Stars: ✭ 252 (+245.21%)
Mutual labels: xml, parser
Corexlsx
Excel spreadsheet (XLSX) format parser written in pure Swift
Stars: ✭ 481 (+558.9%)
Mutual labels: xml, parser
Stream Parser
⚡ PHP7 / Laravel Multi-format Streaming Parser
Stars: ✭ 391 (+435.62%)
Mutual labels: xml, parser
Sax Wasm
The first streamable, fixed memory XML, HTML, and JSX parser for WebAssembly.
Stars: ✭ 89 (+21.92%)
Mutual labels: xml, parser
Xml Js
Converter utility between XML text and Javascript object / JSON text.
Stars: ✭ 874 (+1097.26%)
Mutual labels: xml, parser
Internettools
XPath/XQuery 3.1 interpreter for Pascal with compatibility modes for XPath 2.0/XQuery 1.0/3.0, custom and JSONiq extensions, XML/HTML parsers and classes for HTTP/S requests
Stars: ✭ 82 (+12.33%)
Mutual labels: xml, parser
Choetl
ETL Framework for .NET / c# (Parser / Writer for CSV, Flat, Xml, JSON, Key-Value, Parquet, Yaml, Avro formatted files)
Stars: ✭ 372 (+409.59%)
Mutual labels: xml, parser
Fuzi
A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
Stars: ✭ 894 (+1124.66%)
Mutual labels: xml, parser
Fast Xml Parser
Validate XML, Parse XML to JS/JSON and vise versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback
Stars: ✭ 1,021 (+1298.63%)
Mutual labels: xml, parser
Parser Javascript
Browser sniffing gone too far — A useragent parser library for JavaScript
Stars: ✭ 66 (-9.59%)
Mutual labels: parser
Anglesharp.js
👼 Extends AngleSharp with a .NET-based JavaScript engine.
Stars: ✭ 68 (-6.85%)
Mutual labels: parser
Cppast.codegen
An extensible library providing C# PInvoke codegen from C/C++ files for .NET
Stars: ✭ 65 (-10.96%)
Mutual labels: parser
xmlparser
xmlparser is a low-level, pull-based, zero-allocation XML 1.0 parser.
Example
for token in xmlparser::Tokenizer::from("<tagname name='value'/>") {
println!("{:?}", token);
}
Why a new library?
This library is basically a low-level XML tokenizer that preserves the positions of the tokens and is not intended to be used directly. If you are looking for a higher level solution, check out roxmltree.
Benefits
- All tokens contain
StrSpan
structs which represent the position of the substring in the original document. - Good error processing. All error types contain the position (line:column) where it occurred.
- No heap allocations.
- No dependencies.
- Tiny. ~1400 LOC and ~30KiB in the release build according to
cargo-bloat
. - Supports
no_std
builds. To use without the standard library, disable the default features.
Limitations
- Currently, only ENTITY objects are parsed from the DOCTYPE. All others are ignored.
- No tree structure validation. So an XML like
<root><child></root></child>
or a string without root element will be parsed without errors. You should check for this manually. On the other hand<a/><a/>
will lead to an error. - Duplicated attributes is not an error. So XML like
<item a="v1" a="v2"/>
will be parsed without errors. You should check for this manually. - UTF-8 only.
Safety
- The library must not panic. Any panic is considered a critical bug and should be reported.
- The library forbids unsafe code.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].