SDXF
SDXF (Structured Data eXchange Format) is a data serialization format defined by RFC 3072.[src] It allows arbitrary structured data of different types to be assembled in one file for exchanging between arbitrary computers.[src] The ability to arbitrarily serialize data into a self-describing format is reminiscent of XML, but SDXF is not a text format (as XML) — SDXF is not compatible with text editors.[src] The maximal length of a datum (composite as well as elementary) encoded using SDXF is 16777215 bytes (one less than 16 MB).[src]
SDXF (Structured Data eXchange Format) is a data serialization format defined by RFC 3072.[src] It allows arbitrary structured data of different types to be assembled in one file for exchanging between arbitrary computers.[src] The ability to arbitrarily serialize data into a self-describing format is reminiscent of XML, but SDXF is not a text format (as XML) — SDXF is not compatible with text editors.[src] The maximal length of a datum (composite as well as elementary) encoded using SDXF is 16777215 bytes (one less than 16 MB).[src] ==Technical structure format== SDXF data can express arbitrary levels of structural depth.[src] Data elements are self-documenting, meaning that the metadata (numeric, character string or structure) are encoded into the data elements.[src] The design of this format is simple and transparent: computer programs access SDXF data with the help of well-defined functions, exempting programmers from learning the precise data layout.[src] The word "exchange" in the name reflects another kind of transparency: the SDXF functions provide a computer architecture independent conversion of the data.[src] Serializations can be exchanged among computers (via direct network, file transfer or CD) without further measures.[src] The SDXF functions on the receiving side handle architectural adaptation.[src] Structured data is data with patterns predictable more complex than strings of text.[src] ==Example== A commercial example: two companies want to exchange digital invoices.[src] The invoices have the following hierarchical nested structure: INVOICE │ ├─ INVOICE_NO ├─ DATE ├─ ADDRESS_SENDER │ ├─ NAME │ ├─ NAME │ ├─ STREET │ ├─ ZIP │ ├─ CITY │ └─ COUNTRY ├─ ADDRESS_RECIPIENT │ ├─ NAME │ ├─ NAME │ ├─ STREET │ ├─ ZIP │ ├─ CITY │ └─ COUNTRY ├─ INVOICE_SUM ├─ SINGLE_ITEMS │ ├─ SINGLE_ITEM │ │ ├─ QUANTITY │ │ ├─ ITEM_NUMBER │ │ ├─ ITEM_TEXT │ │ ├─ CHARGE │ │ └─ SUM │ └─ ...[src] ├─ CONDITIONS ...[src] ==Structure== The basic element is a chunk.[src] An SDXF serialization is itself a chunk.[src] A chunk can consist of a set of smaller chunks.[src] Chunks are composed of a header prefix of six bytes, followed by data.[src] The header contains a chunk identifier as a 2-byte binary number (Chunk_ID), the chunk length and type.[src] It may contain additional information about compression, encryption and more.[src] The chunk type indicates whether the data consists of text (a string of characters), a binary number (integer or floating point) or if the chunk a composite of other chunks.[src] Structured chunks enable the programmer to pack hierarchical constructions such as the INVOICE above into an SDXF structure as follow: Every named term (INVOICE, INVOICE_NO, DATE, ADDRESS_SENDER, etc.) is given a unique number out in the range 1 to 65535 (2 byte unsigned binary integer without sign).[src] The top/outermost chunk is constructed with the ID INVOICE (that means with the associated numerical chunk_ID) as a structured chunk on level 1.[src] This INVOICE chunk is filled with other chunks on level 2 and beyond: INVOICE_NO, DATE, ADDRESS_SENDER, ADDRESS_RECIPIENT, INVOICE_SUM, SINGLE_ITEMS, CONDITIONS.[src] Some level 2 chunks are structured in turn as for the two addresses and SINGLE_ITEMS.[src] For a precise description see page 2 of the RFC or alternatively here.[src] SDXF allows programmer to work on SDXF structures with a compact function set.[src] There are only few of them: The following pseudocode creates invoices: init (sdx, buffersize=1000); // initialize the SDXF parameter structure sdx create (sdx, ID=INVOICE, datatype=STRUCTURED); // start of the main structure create (sdx, ID=INVOICE_NO, datatype=NUMERIC, value=123456); // create an elementary Chunk create (sdx, ID=DATE, datatype=CHAR, value="2005-06-17"); // once more create (sdx, ID=ADDRESS_SENDER, datatype=STRUCTURED); // Substructure create (sdx, ID=NAME, datatype=CHAR, value="Peter Somebody"); // element.[src] Chunk inside this substructure ...[src] create (sdx, ID= COUNTRY, datatype=CHAR, value="France"); // the last one inside this substructure leave; // closing the substructure ADDRESS_SENDER ...[src] leave; // closing the substructure INVOICE Pseudocode to extract the INVOICE structure could look like: init (sdx, container=pointer to an SDXF-structure); // initialize the SDXF parameter structure sdx enter (sdx); // join into the INVOICE structure.[src] // while (sdx.rc == SDX_RC_ok) { switch (sdx.[src] Chunk_ID) { case INVOICE_NO: extract (sdx); invno = sdx.value; // the extract function put integer values into the parameter field 'value' break; // case DATE: extract (sdx); strcpy (invdate, sdx.data); // sdx.data is a pointer to the extracted character string break; // case ADDRESS_SENDER: enter (sdx); // we use 'enter' because ADDRESS is a structured Chunk do while (sdx.rc == SDX_RC_ok) // inner loop ...[src] break; ...[src] } } SDXF is not designed for readability or to be modified by text editors.[src] A related editable structure is SDEF - Structured Data Editable Format.[src] ==See also== External Data Representation Protocol Buffers Abstract Syntax Notation One Apache Thrift Etch (protocol) Internet Communications Engine Comparison of data serialization formats ==References== ==External links== Introduction chapter of a more detailed description[src]
41 sentences · 41 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"SDXF." encyclopegia.org, 2024, https://encyclopegia.org/wiki/sdxf. Accessed 25 November 2026.
Chicago
"SDXF." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/sdxf.
APA
encyclopegia.org. (2024). SDXF. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/sdxf
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON