ConciseXML Reduced (CXR) is a syntax that is a minimal subset of ConciseXML Syntax. It maintains the full expressiveness of XML and ConciseXML Syntax while achieving a dramatic simplification, but CXR is not compatible with XML. The XML 1.0 syntax has a number of syntactic forms that come from its SGML origin. CXR makes it possible to develop very small and simple parsers. A ConciseXML Reduced parser can be over 100 times smaller than an XML parser. The test case can be found below.
The following syntactic forms are supported in XML 1.0, but are not supported in ConciseXML Reduced (CXR)
The following syntactic forms are supported in ConciseXML Syntax, but are not supported in ConciseXML Reduced (CXR)
A CXR parser can parse the following string into the object structure shown below.
<foo a_attribute_value="10" a_string="10" a_string_with_line_feed="xx yyy" a_integer=10000000 a_decimal=10.0 ignore_space_around_equal = 10 a_single_quoted_string='10' "a_quoted_key"=10 a_boolean=true a_null=null a_call=<some_call "some unkeyed value" /> a_call_with_path=<foo.bar "some unkeyed value" /> "unkeyed string in key 0" "unkeyed string in key 1" 100 <* comment /> <some_call/> <* support for paths and symbols /> a_symbol=xxx a_path=path_part_0.path_part_1.path_part_2 a_path_with_integers=path_part_0.0 a_path_starting_with_dot=.path_part0.path_part1 a_path_starting_with_dot2=.0 a_path_with_call=xxx.<a_call/> 'a "single-quoted" key with embedded quotes'=10 <some_call "key may be a call" />=10 a_path_with_quoted_part=path_part_0."0" dash-in-key=10 00011.00="leading zeros in number key are ignored" -11="negative integer as key" /> <foo /> |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||