-
Notifications
You must be signed in to change notification settings - Fork 2
xmlns
-
xml version: 1.0
-
character encoding must be UTF-8
-
Top level node: "flat"
-
attributes:
- flat-xml-version: specify version of flat-xmlns used in the document.
- meta: indicate meta-data regarding document, such as an object type that was mapped.
- created: ISO 8601 formatted time of document creation.
- crc32: crc32 polynomial expressed as a base16 number of a hypothetical object represented by the document, similar in purpose to the ETAG HTTP header.
- md5: md5 hash expressed as a base16 number of a hypothetical object represented by the document, similar in purpose to an ETAG HTTP header.
-
Base64 Encoding may be described for an attribute value:
-
the encoded attribute value should be prefixed with "data:application/octet-stream;base64,".
-
example usage, considering the value "hello"
<mynode myattr="data:application/octet-stream;base64,aGVsbG8=" />
-
Base64 Encoding may be described for an node value:
-
example usage, considering the value "hello"
<mynode encoding="base64">aGVsbG8=</mynode>
-
A subset of xsi methodology may optionally describe a node's data:
-
required attributes for xsi data description:
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
-
A subset of xsi types may be described with the attribute "xsi:type"
- xsi:type="xs:DateTime"
- xsi:type="xs:hexBinary"
- xsi:type="xs:base64Binary"
- xsi:type="xs:anyURI"
- xsi:type="xs:string"
- xsi:type="xs:integer"
- xsi:type="xs:decimal"
- xsi:type="xs:boolean"
-
A 'nil' value may be described with the attribute "xsi:null"
- xsi:nil="true"
-
example xsi usage, considering a 'string' type with the value "My String":
-
<mynode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xsi:type="xs:string">My String</mynode>
-
-
example xsi usage, considering a 'nil' value:
-
<mynode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xsi:nil="true" />
-
-
Reserved node names:
-
dump: nodes with name "dump" must include the attribute "encoding" to describe encoding type. Acceptable values are "base64" and "none".
<dump encoding="base64">aGVsbG8=</dump>
<dump encoding="none">hello</dump>
-
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 subset member reference to it's parent node.
- example usage, considering a parent node "mylist" with 2 subset members:
<mylist> <item index="0">Item 1</item> <item index="1">Item 2</item> </mylist>
- example usage, considering a parent node "mylist" with 2 subset members:
-
"key": string value indicating a node's subset member 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": `