FLCBYTBF-API
FLUC C++ Stream Buffer Interface

XML element types (see: FLMMAT_TYP_XMLELM) More...

Macros

#define FLMELM_TYPXML_DATA   0
 XML data element type.
 
#define FLMELM_TYPXML_STARTELM   1
 Start of opening XML tag element type.
 
#define FLMELM_TYPXML_ENDSTRTELM   2
 End of opening XML tag element type.
 
#define FLMELM_TYPXML_ENDELM   3
 Closing XML tag element type.
 
#define FLMELM_TYPXML_ATTNAME   4
 Attribute name element type.
 
#define FLMELM_TYPXML_ATTRVAL   5
 Attribute value element type.
 
#define FLMELM_TYPXML_XML   6
 XML prolog element type.
 
#define FLMELM_TYPXML_SKIPENT   7
 General skipped entity element type.
 
#define FLMELM_TYPXML_SKIPPARMENT   8
 Skipped parameter entity element type.
 
#define FLMELM_TYPXML_STARTDTD   9
 Start of a DTD (Document Type Definition) element type.
 
#define FLMELM_TYPXML_ENDDTD   10
 End of a DTD element type.
 
#define FLMELM_TYPXML_ELMDECL   11
 DTD element type declaration element type.
 
#define FLMELM_TYPXML_ATTLDECL   12
 DTD attribute list declaration element type.
 
#define FLMELM_TYPXML_INTENTDECL   13
 Internal entity declaration element type.
 
#define FLMELM_TYPXML_SYSENTDECL   14
 External entity declaration element type with system identifier.
 
#define FLMELM_TYPXML_PUBENTDECL   15
 External entity declaration element type with public identifier.
 
#define FLMELM_TYPXML_NOTDECLS   16
 Notation declaration element type with a system identifier.
 
#define FLMELM_TYPXML_NOTDECLP   17
 Notation declaration element type with a public identifier.
 
#define FLMELM_TYPXML_NOTDECLPS   18
 Notation declaration element type with a public and system identifier.
 
#define FLMELM_TYPXML_PROCINST   19
 Processing instruction element type.
 
#define FLMELM_TYPXML_STARTCD   20
 Start of CDATA section element type.
 
#define FLMELM_TYPXML_ENDCD   21
 Start of CDATA section element type.
 
#define FLMELM_TYPXML_COMMENT   22
 Comment element type.
 
#define FLMELM_TYPXML_DEFAULT   23
 Element type for all other data in a document.
 
#define FLMELM_TYPXML_STARTNS   24
 Start declaration name space handler.
 
#define FLMELM_TYPXML_ENDNS   25
 End declaration name space handler.
 

Detailed Description

XML element types (see: FLMMAT_TYP_XMLELM)

A XML matrix consists of a number of different element types of which each reflects one part of the XML specification. Some contain single strings, others contain multiple strings separated by.

Macro Definition Documentation

◆ FLMELM_TYPXML_DATA

#define FLMELM_TYPXML_DATA   0

XML data element type.

Contains the character data of an XML node. More specifically, it holds the character sequence found between an opening and closing tag or within a CDATA section. There may be multiple consecutive XML data elements, possibly interrupted by other elements like children XML nodes, comments and other entities. Data elements returned by FLAM through one of the APIs' read functions are at least 1024 bytes long if the XML node contains that many bytes. For XML nodes containing less than 1024 bytes of character data, the data is guaranteed to be returned in one element (i.e. is not split to multiple elements).

◆ FLMELM_TYPXML_STARTELM

#define FLMELM_TYPXML_STARTELM   1

Start of opening XML tag element type.

Indicates the start of an opening XML tag. It contains the tag name as payload. If namespace processing is enabled, the tag is prefixed with the namespace URI and optionally postfixed with the namespace prefix. This element type is immediately followed by pairs of elements of types FLMELM_TYPXML_ATTNAME and FLMELM_TYPXML_ATTRVAL for each of the tag's attributes (if any). The end of an opening XML tag is indicated by an element of type FLMELM_TYPXML_ENDSTRTELM (mandatory).

◆ FLMELM_TYPXML_ENDSTRTELM

#define FLMELM_TYPXML_ENDSTRTELM   2

End of opening XML tag element type.

Indicates the end of an opening XML tag. It must be preceded by a FLMELM_TYPXML_DATA element. This element carries no payload, i.e. its data length is zero.

◆ FLMELM_TYPXML_ENDELM

#define FLMELM_TYPXML_ENDELM   3

Closing XML tag element type.

Indicates a closing XML tag. It contains the tag name as payload. If namespace processing is enabled, the tag is prefixed with the namespace URI and optionally postfixed with the namespace prefix. In a valid XML document, there must be a matching FLMELM_TYPXML_STARTELM element prior to a closing XML tag element.

◆ FLMELM_TYPXML_ATTNAME

#define FLMELM_TYPXML_ATTNAME   4

Attribute name element type.

The name of an attribute within an opening XML tag. If namespace processing is enabled, the attribute name is prefixed with the namespace URI and optionally postfixed with the namespace prefix. Must be immediately followed by an element of type FLMELM_TYPXML_ATTRVAL.

This element type may only occur between pairs of elements of types FLMELM_TYPXML_STARTELM and FLMELM_TYPXML_ENDELM.

◆ FLMELM_TYPXML_ATTRVAL

#define FLMELM_TYPXML_ATTRVAL   5

Attribute value element type.

The value of an attribute within an opening XML tag. Must be immediately preceded by an element of type FLMELM_TYPXML_ATTNAME.

This element type may only occur between pairs of elements of types FLMELM_TYPXML_STARTELM and FLMELM_TYPXML_ENDELM.

◆ FLMELM_TYPXML_XML

#define FLMELM_TYPXML_XML   6

XML prolog element type.

Element for the prolog of an XML document, e.g. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>. The XML prolog is always the first element and must not be preceded by any other element. The prolog is optional, but recommended by the standard. The element's payload are the three attributes separated by a NUL character, each:

<version>\0<encoding>\0<standalone>
  • The version is mandatory according to the XML standard.
  • The encoding string is optional and may be empty. It contains the character encoding of the document.
  • The standalone field is a one byte field with one of three possible values:
    • - (no standalone field present)
    • Y (standalone="yes")
    • N (standalone="no")

◆ FLMELM_TYPXML_SKIPENT

#define FLMELM_TYPXML_SKIPENT   7

General skipped entity element type.

A general entity is a reference to a replacement text that is associated with a name. It is encoded in the XML document body as &name; with name being the name of the entity. Its value is defined by an entity declaration in the DTD for the XML document. We do not interpret DTDs. Therefore, these entities are not replaced with the actual text, but reported as skipped entities. The payload of a general skipped entity element is the name of the entity.

See also
FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_SYSENTDECL, FLMELM_TYPXML_PUBENTDECL

◆ FLMELM_TYPXML_SKIPPARMENT

#define FLMELM_TYPXML_SKIPPARMENT   8

Skipped parameter entity element type.

A parameter entity is a reference to a replacement text that is associated with a name. Unlike general entities, parameter entities are only replaced if used inside the DTD and are encoded as name; with name being the name of the entity. Its value is defined by a parameter entity declaration in the DTD of the XML document. We do not interpret DTDs. Therefore, these entities are not replaced with the actual text, but reported as skipped parameter entities. The payload of a skipped parameter entity element is the name of the entity.

See also
FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_SYSENTDECL, FLMELM_TYPXML_PUBENTDECL

◆ FLMELM_TYPXML_STARTDTD

#define FLMELM_TYPXML_STARTDTD   9

Start of a DTD (Document Type Definition) element type.

A document type definition (DTD) defines the structure of an XML document. It can be specified inline within the XML document itself or as a reference to some external resource. An FLMELM_TYPXML_ENDDTD element must follow before the first XML tag occurs to terminate the DTD. The start of a DTD has one of these following forms:

  1. <!DOCTYPE name SYSTEM "sysid"
  2. <!DOCTYPE name SYSTEM "sysid" [
  3. <!DOCTYPE name PUBLIC "pubid" "sysid"
  4. <!DOCTYPE name PUBLIC "pubid" "sysid" [
  5. <!DOCTYPE name [

The element's payload consists of five attributes separated by a NUL character:

<type>\0<name>\0<public_id>\0<system_id>\0<has_internal_subset>
  • The type flag is one byte that indicates the DTD reference type and has one of three values ** - (case 5, no external reference, DTD is inline, requires has_internal_subset set to 1) ** S (case 1+2, the SYSTEM identifier is present) ** P (case 3+4, the PUBLIC identifier is present)
  • name must be same as the root element in the document
  • public_id contains the public identifier if type=P
  • system_id contains the system identifier if type=S or P
  • has_internal_subset is a single byte field set to the character 1 (not the byte value!) if there is an internal subset (inline DTD) portion. Otherwise, it's set to the character 0.

◆ FLMELM_TYPXML_ENDDTD

#define FLMELM_TYPXML_ENDDTD   10

End of a DTD element type.

Marks the end of a document type definition previously started by a FLMELM_TYPXML_STARTDTD element. It must occur before the first XML tag.

◆ FLMELM_TYPXML_ELMDECL

#define FLMELM_TYPXML_ELMDECL   11

DTD element type declaration element type.

Element type declarations put constraints on XML nodes. For example, this declaration requires an XML node named "html" to have to children "head" and "body":

<!ELEMENT html (head, body)>

The element's payload consists of two attributes separated by a NUL character:

<name>\0<model>
  • name is the XML node name
  • model is a model string complying to the content specification syntax described in the XML standard

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

◆ FLMELM_TYPXML_ATTLDECL

#define FLMELM_TYPXML_ATTLDECL   12

DTD attribute list declaration element type.

Attribute lists describe constraints on attributes of XML nodes. This example defines a required attribute "src" for XML nodes named "img". The attribute value must contain character data:

<!ATTLIST img src CDATA #REQUIRED>

Each attribute list declaration element describes one attribute. The element's payload consists of five attributes separated by a NUL character:

<node_name>\0<attribute_name>\0<attribute_type>\0<default>\0<flag>
  • node_name is the name of the XML node the attribute belongs to
  • attribute_name is the name of the constrained attribute
  • attribute_type contains a string with the type of the attribute (see XML spec for valid values)
  • default specifies a default value if flag is set to D or F
  • flag is one byte describing an attribute mode with one of four values:
    • R (attribute is required, i.e. must be specified)
    • I (attribute is implied, i.e it is optional and without default value)
    • F (attribute must always have the default value)
    • D (attribute has a specified default value)

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

◆ FLMELM_TYPXML_INTENTDECL

#define FLMELM_TYPXML_INTENTDECL   13

Internal entity declaration element type.

Entity declarations define general or parameter entities. Entities names are assigned replacement texts that are substitutes for any occurrence of the entity. Parameter entities are only valid within the DTD. General entities are valid in the XML document body. This element only describes internal entities, i.e. entities with values directly defined within the DTD. Here is an example for an internal general and a internal parameter entity declaration:

  1. <!ENTITY name "value">
  2. <!ENTITY % name "value">

The element's payload consists of three attributes separated by a NUL character:

<name>\0<value>\0<is_parameter_entity>
  • name of the entity
  • value that is substituted for entities with above name
  • is_parameter_entity is the character 1 (not the byte value!) if a parameter entity is declared, 0 for a general entity

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

See also
FLMELM_TYPXML_SYSENTDECL, FLMELM_TYPXML_PUBENTDECL, FLMELM_TYPXML_SKIPENT, FLMELM_TYPXML_SKIPPARMENT

◆ FLMELM_TYPXML_SYSENTDECL

#define FLMELM_TYPXML_SYSENTDECL   14

External entity declaration element type with system identifier.

Entity declarations define general or parameter entities. Entities names are assigned replacement texts that are substitutes for any occurrence of the entity. Parameter entities are only valid within the DTD. General entities are valid in the XML document body. This element only describes external entities with a system identifier, i.e. entities with values defined in another file. The file's content maybe parsed or unparsed (NDATA) data. Here is an example for external general and internal parameter entity declarations with system identifier:

  1. <!ENTITY name SYSTEM "file.txt">
  2. <!ENTITY name SYSTEM "file.txt" NDATA notation>
  3. <!ENTITY % name SYSTEM "file.txt">
  4. <!ENTITY % name SYSTEM "file.txt" NDATA notation>

The element's payload consists of four attributes separated by a NUL character:

<name>\0<system_id>\0<notation_name>\0<is_parameter_entity>
  • name of the entity
  • system_id contains the system identifier, typically a file URI
  • notation_name is a non-empty string if the external resource is unparsed (NDATA) and must match the name of a notation declaration
  • is_parameter_entity is the character 1 (not the byte value!) if a parameter entity is declared, 0 for a general entity

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

See also
FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_PUBENTDECL, FLMELM_TYPXML_SKIPENT, FLMELM_TYPXML_SKIPPARMENT, FLMELM_TYPXML_NOTDECLS, FLMELM_TYPXML_NOTDECLP, FLMELM_TYPXML_NOTDECLPS

◆ FLMELM_TYPXML_PUBENTDECL

#define FLMELM_TYPXML_PUBENTDECL   15

External entity declaration element type with public identifier.

Entity declarations define general or parameter entities. Entities names are assigned replacement texts that are substitutes for any occurrence of the entity. Parameter entities are only valid within the DTD. General entities are valid in the XML document body. This element only describes external entities with a public identifier, i.e. entities with values defined in another file and a public id. The file's content maybe parsed or unparsed (NDATA) data. Here is an example for external general and internal parameter entity declarations with public identifier:

  1. <!ENTITY name PUBLIC "-//private//file//" "file.txt">
  2. <!ENTITY name PUBLIC "-//private//file//" "file.txt" NDATA notation>
  3. <!ENTITY % name PUBLIC "-//private//file//" "file.txt">
  4. <!ENTITY % name PUBLIC "-//private//file//" "file.txt" NDATA notation>

The element's payload consists of five attributes separated by a NUL character:

<name>\0<public_id>\0<system_id>\0<notation_name>\<is_parameter_entity>
  • name of the entity
  • public_id contains the public identifier
  • system_id contains the system identifier, typically a file URI
  • notation_name is a non-empty string if the external resource is unparsed (NDATA) and must match the name of a notation declaration
  • is_parameter_entity is the character 1 (not the byte value!) if a parameter entity is declared, 0 for a general entity

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

See also
FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_SKIPENT, FLMELM_TYPXML_SKIPPARMENT, FLMELM_TYPXML_NOTDECLS, FLMELM_TYPXML_NOTDECLP, FLMELM_TYPXML_NOTDECLPS

◆ FLMELM_TYPXML_NOTDECLS

#define FLMELM_TYPXML_NOTDECLS   16

Notation declaration element type with a system identifier.

Notation declarations define the format of unparsed external entities (referred to by the optional NDATA portion of an entity declaration), the format of elements which bear a notation attribute and more. This element only describes notation declarations with a system identifier of the form:

<!NOTATION name SYSTEM "systemId">

The element's payload consists of two attributes separated by a NUL character:

<name>\0<system_id>
  • name of the entity
  • system_id contains the system identifier

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

See also
FLMELM_TYPXML_NOTDECLP, FLMELM_TYPXML_NOTDECLPS, FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_SYSENTDECL, FLMELM_TYPXML_PUBENTDECL

◆ FLMELM_TYPXML_NOTDECLP

#define FLMELM_TYPXML_NOTDECLP   17

Notation declaration element type with a public identifier.

Notation declarations define the format of unparsed external entities (referred to by the optional NDATA portion of an entity declaration), the format of elements which bear a notation attribute and more. This element only describes notation declarations with a public identifier of the form:

<!NOTATION name PUBLIC "publicId">

The element's payload consists of two attributes separated by a NUL character:

<name>\0<public_id>
  • name of the entity
  • public_id contains the public identifier

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

See also
FLMELM_TYPXML_NOTDECLS, FLMELM_TYPXML_NOTDECLPS, FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_SYSENTDECL, FLMELM_TYPXML_PUBENTDECL

◆ FLMELM_TYPXML_NOTDECLPS

#define FLMELM_TYPXML_NOTDECLPS   18

Notation declaration element type with a public and system identifier.

Notation declarations define the format of unparsed external entities (referred to by the optional NDATA portion of an entity declaration), the format of elements which bear a notation attribute and more. This element only describes notation declarations with a public and system identifier of the form:

<!NOTATION name PUBLIC "publicId" "systemId">

The element's payload consists of three attributes separated by a NUL character:

<name>\0<public_id>\0<system_id>
  • name of the entity
  • public_id contains the public identifier
  • system_id contains the system identifier

This element type may only occur within a DTD, i.e. between pairs of elements of types FLMELM_TYPXML_STARTDTD and FLMELM_TYPXML_ENDDTD.

See also
FLMELM_TYPXML_NOTDECLS, FLMELM_TYPXML_NOTDECLP, FLMELM_TYPXML_INTENTDECL, FLMELM_TYPXML_SYSENTDECL, FLMELM_TYPXML_PUBENTDECL

◆ FLMELM_TYPXML_PROCINST

#define FLMELM_TYPXML_PROCINST   19

Processing instruction element type.

Processing instructions carry instructions to the application. They have a target name and application-specific string. A common example is rendering XML documents using an XSLT stylesheet:

<?xml-stylesheet type="text/xsl" href="style.xsl"?>

The element's payload consists of two attributes separated by a NUL character:

<target>\0<instruction>
  • target names the intended recipient of an instruction
  • instruction is an application-specific string

◆ FLMELM_TYPXML_STARTCD

#define FLMELM_TYPXML_STARTCD   20

Start of CDATA section element type.

A CDATA section contains arbitrary character data which is not parsed by an XML data. So, CDATA sections can contain whole XML documents, which are treated like any other character data. The data in a CDATA section may not contain the character sequence ]]> as this marks the end of a CDATA section.

This element carries no payload, i.e. its data length is zero.

Any number of elements of type FLMELM_TYPXML_DATA may follow, followed by a FLMELM_TYPXML_ENDCD element.

See also
FLMELM_TYPXML_ENDCD

◆ FLMELM_TYPXML_ENDCD

#define FLMELM_TYPXML_ENDCD   21

Start of CDATA section element type.

Marks the end of a CDATA section that has previously been started by a FLMELM_TYPXML_STARTCD element.

This element carries no payload, i.e. its data length is zero.

See also
FLMELM_TYPXML_STARTCD

◆ FLMELM_TYPXML_COMMENT

#define FLMELM_TYPXML_COMMENT   22

Comment element type.

XML comment is arbitrary text data enclosed by <!-- and –>. This element type contains the comment's data as payload. The comment data may not contain the character sequence –> as this marks the end of a comment.

◆ FLMELM_TYPXML_DEFAULT

#define FLMELM_TYPXML_DEFAULT   23

Element type for all other data in a document.

This element type contains the data not covered by one of the other elements. This includes whitespace, tabulators and line breaks that are not part of a nodes content, in other words: ignorable whitespace.

◆ FLMELM_TYPXML_STARTNS

#define FLMELM_TYPXML_STARTNS   24

Start declaration name space handler.

Indicates the start of a name space declaration. It contains the namespace prefix, the separation character and the URI as payload. The prefix can be empty for a default name space definition.

◆ FLMELM_TYPXML_ENDNS

#define FLMELM_TYPXML_ENDNS   25

End declaration name space handler.

Indicates the end of a name space declaration. It contains the namespace prefix as payload.