11 releases (6 breaking)
0.10.0 | Mar 16, 2024 |
---|---|
0.9.1 | Jan 25, 2023 |
0.8.2 | Dec 17, 2022 |
0.8.1 | May 15, 2022 |
0.4.0 | Aug 18, 2021 |
#228 in Parser tooling
229 downloads per month
Used in rxml
16KB
271 lines
rxml_proc
— Compile-time validation of CData, Name and NCName strings
This crate is supplementary to the rxml
crate. It provides three macros (xml_cdata!
, xml_name!
and xml_ncname!
) which convert a normal &str
into the corresponding rxml
string type for strong typing of XML string flavors.
Please see the rxml crate for more information.
Example
use rxml::NCNameStr;
use rxml_proc::xml_ncname;
const XML_PREFIX: &'static NCNameStr = xml_ncname!("xml");
lib.rs
:
Macros for XML strings
This crate provides macros to check XML string syntax at compile time.
Example
use rxml::{CDataStr, NCNameStr, xml_cdata, xml_ncname};
const XML_NAMESPACE: &'static CDataStr = xml_cdata!("http://www.w3.org/XML/1998/namespace");
const XML_PREFIX: &'static NCNameStr = xml_ncname!("xml");
See also
This crate bases on the rxml_validation
crate and it primarily intended
for use with the rxml
crate.
Dependencies
~335–790KB
~19K SLoC