-
Notifications
You must be signed in to change notification settings - Fork 2
xmlns
Doug Bird edited this page Oct 23, 2015
·
31 revisions
#Flat XML Schema An XML Namespace
- xml version: 1.0
- character encoding must be UTF-8
- Top level node:
- suggested namespace declarations:
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:extxs="https://github.com/katmore/flat/wiki/xmlns-extxs"
- xmlns="https://github.com/katmore/flat/wiki/xmlns-object"
- xmlns:fx="https://github.com/katmore/flat/wiki/xmlns"
- attributes:
- fx:flat-xml-version: specify version of flat-xmlns used in the document.
- fx:meta: indicate meta-data regarding document, such as an object type that was mapped.
- fx:created: ISO 8601 formatted time of document creation.
- fx:crc32: crc32 polynomial of a hypothetical object represented by the document; expressed as a base16 number.
- fx:md5: md5 hash of a hypothetical object represented by the document; expressed as a base16 number.
- data: nodes with the name "data" must use flat's xsi methodology to describe values.
-
<data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xsi:type="xs:string">My String</data>
-
- Reserved attribute names:
- "index": numerical integer value indicating a node's relationship to its parent as a reference.
- example usage, considering a parent node "mylist" with 2 subset members:
<mylist> <item extxs:index="0">Item 1</item> <item extxs:index="1">Item 2</item> </mylist>
- example usage, considering a parent node "mylist" with 2 subset members:
- "key": string value indicating a node's relationship to its parent as a reference.
- example usage, considering a parent node "mything" with a member having key "my_first_thing" and another having key "my_second_thing" with corresponding values of "Thing 1" and "Thing 2": `