libxml2_parserinternals.h File Reference

SAX_COMPAT_MODE

XML_MAX_NAMELEN

XML_MAX_NAMELEN:

Identifiers can be longer, but this will be more costly at runtime.

INPUT_CHUNK

INPUT_CHUNK:

The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors.

MIN_STACK_THRESHOLD

MIN_STACK_THRESHOLD:

The safty buffer that defines number of bytes from stack overflow.

MAX_STACK_THRESHOLD

MAX_STACK_THRESHOLD:

The safty buffer that defines number of bytes from stack overflow. This value is used for SAX parsing - buffer is bigger to account for stack that might be allocated during user callbacks

IS_BYTE_CHAR

IS_BYTE_CHAR: Macro to check the following production in the XML spec:

[2] Char ::= #x9 | #xA | #xD | [#x20...] any byte character in the accepted range

IS_CHAR

IS_CHAR: Macro to check the following production in the XML spec:

[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.

IS_CHAR_CH

IS_CHAR_CH: Behaves like IS_CHAR on single-byte value

IS_BLANK

IS_BLANK: Macro to check the following production in the XML spec:

[3] S ::= (#x20 | #x9 | #xD | #xA)+

IS_BLANK_CH

IS_BLANK_CH: Behaviour same as IS_BLANK

OOM: never

IS_BASECHAR

IS_BASECHAR: Macro to check the following production in the XML spec:

[85] BaseChar ::= ... long list see REC ...

IS_DIGIT

IS_DIGIT: Macro to check the following production in the XML spec:

[88] Digit ::= ... long list see REC ...

IS_DIGIT_CH

IS_DIGIT_CH: Behaves like IS_DIGIT but with a single byte argument

IS_COMBINING

IS_COMBINING: Macro to check the following production in the XML spec:

[87] CombiningChar ::= ... long list see REC ...

IS_COMBINING_CH

IS_COMBINING_CH: Always false (all combining chars > 0xff)

IS_EXTENDER

IS_EXTENDER: Macro to check the following production in the XML spec:

[89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]

IS_EXTENDER_CH

IS_EXTENDER_CH: Behaves like IS_EXTENDER but with a single-byte argument

IS_IDEOGRAPHIC

IS_IDEOGRAPHIC: Macro to check the following production in the XML spec:

[86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]

IS_LETTER

IS_LETTER: Macro to check the following production in the XML spec:

[84] Letter ::= BaseChar | Ideographic

IS_LETTER_CH

IS_LETTER_CH: Macro behaves like IS_LETTER, but only check base chars

IS_PUBIDCHAR

IS_PUBIDCHAR: Macro to check the following production in the XML spec:

[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#$_%]

IS_PUBIDCHAR_CH

IS_PUBIDCHAR_CH: Same as IS_PUBIDCHAR but for single-byte value

SKIP_EOL

SKIP_EOL: Skips the end of line chars.

MOVETO_ENDTAG

MOVETO_ENDTAG: Skips to the next '>' char.

MOVETO_STARTTAG

MOVETO_STARTTAG: Skips to the next '<' char.

xmlStringText

XMLPUBVAR const xmlCharxmlStringText

Global constants used for predefined strings.

xmlStringTextNoenc

XMLPUBVAR const xmlCharxmlStringTextNoenc

xmlStringComment

XMLPUBVAR const xmlCharxmlStringComment

xmlIsLetter ( int )

XMLPUBFUN int XMLCALLxmlIsLetter(intc)

xmlIsLetter: Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic

Returns 0 if not, non-zero otherwise

Parameters
can unicode character (int)

xmlCreateFileParserCtxt ( const char * )

XMLPUBFUN xmlParserCtxtPtr XMLCALLxmlCreateFileParserCtxt(const char *filename)

Parser context.

xmlCreateFileParserCtxt: Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

Returns the new parser context or NULL

Parameters
filenamethe filename

xmlCreateURLParserCtxt ( const char *, int )

XMLPUBFUN xmlParserCtxtPtr XMLCALLxmlCreateURLParserCtxt(const char *filename,
intoptions
)

xmlCreateURLParserCtxt: Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses

Returns the new parser context or NULL

Parameters
filenamethe filename or URL
optionsa combination of xmlParserOption

xmlCreateMemoryParserCtxt ( const char *, int )

XMLPUBFUN xmlParserCtxtPtr XMLCALLxmlCreateMemoryParserCtxt(const char *buffer,
intsize
)

xmlCreateMemoryParserCtxt: Create a parser context for an XML in-memory document.

Returns the new parser context or NULL

OOM: possible --> returns NULL, OOM flag is set

Parameters
buffera pointer to a char array
sizethe size of the array

xmlCreateEntityParserCtxt ( const xmlChar *, const xmlChar *, const xmlChar * )

XMLPUBFUN xmlParserCtxtPtr XMLCALLxmlCreateEntityParserCtxt(const xmlChar *URL,
const xmlChar *ID,
const xmlChar *base
)

xmlCreateEntityParserCtxt: Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

Returns the new parser context or NULL

Parameters
URLthe entity URL
IDthe entity PUBLIC ID
basea possible base for the target URI

xmlSwitchEncoding ( xmlParserCtxtPtr, xmlCharEncoding )

XMLPUBFUN int XMLCALLxmlSwitchEncoding(xmlParserCtxtPtrctxt,
xmlCharEncodingenc
)

xmlSwitchEncoding: change the input functions when discovering the character encoding of a given entity.

Returns 0 in case of success, -1 otherwise

OOM: possible --> OOM flag is set -- check it always!

Parameters
ctxtthe parser context
encthe encoding value (number)

xmlSwitchToEncoding ( xmlParserCtxtPtr, xmlCharEncodingHandlerPtr )

XMLPUBFUN int XMLCALLxmlSwitchToEncoding(xmlParserCtxtPtrctxt,
xmlCharEncodingHandlerPtrhandler
)

xmlSwitchToEncoding: change the input functions when discovering the character encoding of a given entity.

Returns 0 in case of success, -1 otherwise

OOM: possible --> OOM flag is set when -1 is returned

Parameters
ctxtthe parser context
handlerthe encoding handler

xmlSwitchInputEncoding ( xmlParserCtxtPtr, xmlParserInputPtr, xmlCharEncodingHandlerPtr )

XMLPUBFUN int XMLCALLxmlSwitchInputEncoding(xmlParserCtxtPtrctxt,
xmlParserInputPtrinput,
xmlCharEncodingHandlerPtrhandler
)

xmlSwitchInputEncoding: change the input functions when discovering the character encoding of a given entity.

Returns 0 in case of success, -1 otherwise

OOM: possible --> check OOM flag when -1 is returned

Parameters
ctxtthe parser context
inputthe input stream
handlerthe encoding handler

xmlHandleEntity ( xmlParserCtxtPtr, xmlEntityPtr )

XMLPUBFUN void XMLCALLxmlHandleEntity(xmlParserCtxtPtrctxt,
xmlEntityPtrentity
)

Entities

xmlNewStringInputStream ( xmlParserCtxtPtr, const xmlChar * )

XMLPUBFUN xmlParserInputPtr XMLCALLxmlNewStringInputStream(xmlParserCtxtPtrctxt,
const xmlChar *buffer
)

Input Streams.

xmlNewStringInputStream: Create a new input stream based on a memory buffer. Returns the new input stream

Parameters
ctxtan XML parser context
bufferan memory buffer

xmlNewEntityInputStream ( xmlParserCtxtPtr, xmlEntityPtr )

XMLPUBFUN xmlParserInputPtr XMLCALLxmlNewEntityInputStream(xmlParserCtxtPtrctxt,
xmlEntityPtrentity
)

xmlNewEntityInputStream: Create a new input stream based on an xmlEntityPtr

Returns the new input stream or NULL

OOM:

Parameters
ctxtan XML parser context
entityan Entity pointer

xmlPushInput ( xmlParserCtxtPtr, xmlParserInputPtr )

XMLPUBFUN void XMLCALLxmlPushInput(xmlParserCtxtPtrctxt,
xmlParserInputPtrinput
)

xmlPushInput: xmlPushInput: switch to a new input stream which is stacked on top of the previous one(s).

Parameters
ctxtan XML parser context
inputan XML parser input fragment (entity, XML fragment ...).

xmlPopInput ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar XMLCALLxmlPopInput(xmlParserCtxtPtrctxt)

xmlPopInput: xmlPopInput: the current input pointed by ctxt->input came to an end pop it and return the next char.

Returns the current xmlChar in the parser context

OOM: possible --> check OOM flag!!!

Parameters
ctxtan XML parser context

xmlFreeInputStream ( xmlParserInputPtr )

XMLPUBFUN void XMLCALLxmlFreeInputStream(xmlParserInputPtrinput)

xmlFreeInputStream: Free up an input stream.

OOM: never

Parameters
inputan xmlParserInputPtr

xmlNewInputFromFile ( xmlParserCtxtPtr, const char * )

XMLPUBFUN xmlParserInputPtr XMLCALLxmlNewInputFromFile(xmlParserCtxtPtrctxt,
const char *filename
)

xmlNewInputFromFile: Create a new input stream based on a file or an URL.

Returns the new input stream or NULL in case of error

OOM: possible --> always check OOM flag

Parameters
ctxtan XML parser context
filenamethe filename to use as entity

xmlNewInputStream ( xmlParserCtxtPtr )

XMLPUBFUN xmlParserInputPtr XMLCALLxmlNewInputStream(xmlParserCtxtPtrctxt)

xmlNewInputStream: Create a new input stream structure Returns the new input stream or NULL

OOM: possible --> returns NULL, OOM flag is set

Parameters
ctxtan XML parser context

xmlSplitQName ( xmlParserCtxtPtr, const xmlChar *, xmlChar ** )

XMLPUBFUN xmlChar *XMLCALLxmlSplitQName(xmlParserCtxtPtrctxt,
const xmlChar *name,
xmlChar **prefix
)

Namespaces.

xmlSplitQName: parse an UTF8 encoded XML qualified name string

[NS 5] QName ::= (Prefix ':')? LocalPart

[NS 6] Prefix ::= NCName

[NS 7] LocalPart ::= NCName

Returns the local part, and prefix is updated to get the Prefix if any.

OOM: possible --> returns NULL (*prefix is NULL too); always check OOM flag to distinguish OOM and "bad QName"

Parameters
ctxtan XML parser context
namean XML parser context
prefixa xmlChar **

xmlNamespaceParseNCName ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlNamespaceParseNCName(xmlParserCtxtPtrctxt)

xmlNamespaceParseQName ( xmlParserCtxtPtr, xmlChar ** )

XMLPUBFUN xmlChar *XMLCALLxmlNamespaceParseQName(xmlParserCtxtPtrctxt,
xmlChar **prefix
)

xmlNamespaceParseNSDef ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlNamespaceParseNSDef(xmlParserCtxtPtrctxt)

xmlParseQuotedString ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseQuotedString(xmlParserCtxtPtrctxt)

xmlParseNamespace ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseNamespace(xmlParserCtxtPtrctxt)

xmlScanName ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlScanName(xmlParserCtxtPtrctxt)

Generic production rules.

xmlParseName ( xmlParserCtxtPtr )

XMLPUBFUN const xmlChar *XMLCALLxmlParseName(xmlParserCtxtPtrctxt)

xmlParseName: parse an XML name.

[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender

[5] Name ::= (Letter | '_' | ':') (NameChar)*

[6] Names ::= Name (S Name)*

Returns the Name parsed or NULL

OOM: possible --- Review is not finished (for xmlParseNameComplex) --> OOM flag is set when NULL is returned

Parameters
ctxtan XML parser context

xmlParseNmtoken ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseNmtoken(xmlParserCtxtPtrctxt)

xmlParseNmtoken: parse an XML Nmtoken.

[7] Nmtoken ::= (NameChar)+

[8] Nmtokens ::= Nmtoken (S Nmtoken)*

Returns the Nmtoken parsed or NULL

OOM: possible --> for too long names; check OOM flag

Parameters
ctxtan XML parser context

xmlParseEntityValue ( xmlParserCtxtPtr, xmlChar ** )

XMLPUBFUN xmlChar *XMLCALLxmlParseEntityValue(xmlParserCtxtPtrctxt,
xmlChar **orig
)

xmlParseEntityValue: parse a value for ENTITY declarations

[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"

Returns the EntityValue parsed with reference substituted or NULL

Parameters
ctxtan XML parser context
origif non-NULL store a copy of the original entity value

xmlParseAttValue ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseAttValue(xmlParserCtxtPtrctxt)

xmlParseAttValue: parse a value for an attribute Note: the parser won't do substitution of entities here, this will be handled later in xmlStringGetNodeList

[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"

3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows:
  • a character reference is processed by appending the referenced character to the attribute value

  • an entity reference is processed by recursively processing the replacement text of the entity

  • a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a "#xD#xA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity

  • other characters are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA.

Returns the AttValue parsed or NULL. The value has to be freed by the caller.

Parameters
ctxtan XML parser context

xmlParseSystemLiteral ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseSystemLiteral(xmlParserCtxtPtrctxt)

xmlParseSystemLiteral: parse an XML Literal

[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")

Returns the SystemLiteral parsed or NULL

Parameters
ctxtan XML parser context

xmlParsePubidLiteral ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParsePubidLiteral(xmlParserCtxtPtrctxt)

xmlParsePubidLiteral: parse an XML public literal

[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"

Returns the PubidLiteral parsed or NULL.

Parameters
ctxtan XML parser context

xmlParseCharData ( xmlParserCtxtPtr, int )

XMLPUBFUN void XMLCALLxmlParseCharData(xmlParserCtxtPtrctxt,
intcdata
)

xmlParseCharData: parse a CharData section. if we are within a CDATA section ']]>' marks an end of section.

The right angle bracket (>) may be represented using the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section.

[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

Parameters
ctxtan XML parser context
cdataint indicating whether we are within a CDATA section

xmlParseExternalID ( xmlParserCtxtPtr, xmlChar **, int )

XMLPUBFUN xmlChar *XMLCALLxmlParseExternalID(xmlParserCtxtPtrctxt,
xmlChar **publicID,
intstrict
)

xmlParseExternalID: Parse an External ID or a Public ID

NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral

[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral

[83] PublicID ::= 'PUBLIC' S PubidLiteral

Returns the function returns SystemLiteral and in the second case publicID receives PubidLiteral, is strict is off it is possible to return NULL and have publicID set.

Parameters
ctxtan XML parser context
publicIDa xmlChar** receiving PubidLiteral
strictindicate whether we should restrict parsing to only production [75], see NOTE below

xmlParseComment ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseComment(xmlParserCtxtPtrctxt)

xmlParseComment: Skip an XML (SGML) comment The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. "

[15] Comment ::= ''

Parameters
ctxtan XML parser context

xmlParsePITarget ( xmlParserCtxtPtr )

XMLPUBFUN const xmlChar *XMLCALLxmlParsePITarget(xmlParserCtxtPtrctxt)

xmlParsePITarget: parse the name of a PI

[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

Returns the PITarget name or NULL

Parameters
ctxtan XML parser context

xmlParsePI ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParsePI(xmlParserCtxtPtrctxt)

xmlParsePI: parse an XML Processing Instruction.

[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'

The processing is transfered to SAX once parsed.

Parameters
ctxtan XML parser context

xmlParseNotationDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseNotationDecl(xmlParserCtxtPtrctxt)

xmlParseNotationDecl: parse a notation declaration

[82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'

Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral

See the NOTE on xmlParseExternalID().

Parameters
ctxtan XML parser context

xmlParseEntityDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseEntityDecl(xmlParserCtxtPtrctxt)

xmlParseEntityDecl: parse <!ENTITY declarations

[70] EntityDecl ::= GEDecl | PEDecl

[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'

[72] PEDecl ::= '<!ENTITY' S '' S Name S PEDef S? '>'

[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)

[74] PEDef ::= EntityValue | ExternalID

[76] NDataDecl ::= S 'NDATA' S Name

[ VC: Notation Declared ] The Name must match the declared name of a notation.

Parameters
ctxtan XML parser context

xmlParseDefaultDecl ( xmlParserCtxtPtr, xmlChar ** )

XMLPUBFUN int XMLCALLxmlParseDefaultDecl(xmlParserCtxtPtrctxt,
xmlChar **value
)

xmlParseDefaultDecl: Parse an attribute default declaration

[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)

[ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration.

[ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared attribute type c.f. xmlValidateAttributeDecl()

[ VC: Fixed Attribute Default ] if an attribute has a default value declared with the #FIXED keyword, instances of that attribute must match the default value.

[ WFC: No < in Attribute Values ] handled in xmlParseAttValue()

returns: XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED or XML_ATTRIBUTE_FIXED.

Parameters
ctxtan XML parser context
valueReceive a possible fixed default value for the attribute

xmlParseNotationType ( xmlParserCtxtPtr )

XMLPUBFUN xmlEnumerationPtr XMLCALLxmlParseNotationType(xmlParserCtxtPtrctxt)

xmlParseNotationType: parse an Notation attribute type.

Note: the leading 'NOTATION' S part has already being parsed...

[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'

[ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.

Returns: the notation attribute tree built while parsing

Parameters
ctxtan XML parser context

xmlParseEnumerationType ( xmlParserCtxtPtr )

XMLPUBFUN xmlEnumerationPtr XMLCALLxmlParseEnumerationType(xmlParserCtxtPtrctxt)

xmlParseEnumerationType: parse an Enumeration attribute type.

[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'

[ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration

Returns: the enumeration attribute tree built while parsing

Parameters
ctxtan XML parser context

xmlParseEnumeratedType ( xmlParserCtxtPtr, xmlEnumerationPtr * )

XMLPUBFUN int XMLCALLxmlParseEnumeratedType(xmlParserCtxtPtrctxt,
xmlEnumerationPtr *tree
)

xmlParseEnumeratedType: parse an Enumerated attribute type.

[57] EnumeratedType ::= NotationType | Enumeration

[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'

Returns: XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION

Parameters
ctxtan XML parser context
treethe enumeration tree built while parsing

xmlParseAttributeType ( xmlParserCtxtPtr, xmlEnumerationPtr * )

XMLPUBFUN int XMLCALLxmlParseAttributeType(xmlParserCtxtPtrctxt,
xmlEnumerationPtr *tree
)

xmlParseAttributeType: parse the Attribute list def for an element

[54] AttType ::= StringType | TokenizedType | EnumeratedType

[55] StringType ::= 'CDATA'

[56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'

Validity constraints for attribute values syntax are checked in xmlValidateAttributeValue()

[ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.

[ VC: One ID per Element Type ] No element type may have more than one ID attribute specified.

[ VC: ID Attribute Default ] An ID attribute must have a declared default of #IMPLIED or #REQUIRED.

[ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.

[ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD.

[ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

Returns the attribute type

Parameters
ctxtan XML parser context
treethe enumeration tree built while parsing

xmlParseAttributeListDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseAttributeListDecl(xmlParserCtxtPtrctxt)

xmlParseAttributeListDecl: : parse the Attribute list def for an element

[52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'

[53] AttDef ::= S Name S AttType S DefaultDecl

Parameters
ctxtan XML parser context

xmlParseElementMixedContentDecl ( xmlParserCtxtPtr, int )

XMLPUBFUN xmlElementContentPtr XMLCALLxmlParseElementMixedContentDecl(xmlParserCtxtPtrctxt,
intinputchk
)

xmlParseElementMixedContentDecl: parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl

[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'

[ VC: Proper Group/PE Nesting ] applies to [51] too (see [49])

[ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.

returns: the list of the xmlElementContentPtr describing the element choices or NULL if error

Parameters
ctxtan XML parser context
inputchkthe input used for the current entity, needed for boundary checks

xmlParseElementChildrenContentDecl ( xmlParserCtxtPtr, int )

XMLPUBFUN xmlElementContentPtr XMLCALLxmlParseElementChildrenContentDecl(xmlParserCtxtPtrctxt,
intinputchk
)

xmlParseElementChildrenContentDecl: parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl

[47] children ::= (choice | seq) ('?' | '*' | '+')?

[48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?

[49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'

[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'

[ VC: Proper Group/PE Nesting ] applies to [49] and [50] Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).

Returns the tree of xmlElementContentPtr describing the element hierarchy.

Parameters
ctxtan XML parser context
inputchkthe input used for the current entity, needed for boundary checks

xmlParseElementContentDecl ( xmlParserCtxtPtr, const xmlChar *, xmlElementContentPtr * )

XMLPUBFUN int XMLCALLxmlParseElementContentDecl(xmlParserCtxtPtrctxt,
const xmlChar *name,
xmlElementContentPtr *result
)

xmlParseElementContentDecl: parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in xmlParseElementDecl

[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children

returns: the type of element content XML_ELEMENT_TYPE_xxx or -1 if error

Parameters
ctxtan XML parser context
namethe name of the element being defined.
resultthe Element Content pointer will be stored here if any

xmlParseElementDecl ( xmlParserCtxtPtr )

XMLPUBFUN int XMLCALLxmlParseElementDecl(xmlParserCtxtPtrctxt)

xmlParseElementDecl: parse an Element declaration.

[45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'

[ VC: Unique Element Type Declaration ] No element type may be declared more than once

Returns the type of the element, or -1 in case of error

Parameters
ctxtan XML parser context

xmlParseMarkupDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseMarkupDecl(xmlParserCtxtPtrctxt)

xmlParseMarkupDecl: parse Markup declarations

[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment

[ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text.

[ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)

Parameters
ctxtan XML parser context

xmlParseCharRef ( xmlParserCtxtPtr )

XMLPUBFUN int XMLCALLxmlParseCharRef(xmlParserCtxtPtrctxt)

xmlParseCharRef: parse Reference declarations

[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'

[ WFC: Legal Character ] Characters referred to using character references must match the production for Char.

Returns the value parsed (as an int), 0 in case of error

Parameters
ctxtan XML parser context

xmlParseEntityRef ( xmlParserCtxtPtr )

XMLPUBFUN xmlEntityPtr XMLCALLxmlParseEntityRef(xmlParserCtxtPtrctxt)

xmlParseEntityRef: parse ENTITY references declarations

[68] EntityRef ::= '&' Name ';'

[ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'.

[ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity

Returns the xmlEntityPtr if found, or NULL otherwise.

Parameters
ctxtan XML parser context

xmlParseReference ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseReference(xmlParserCtxtPtrctxt)

xmlParseReference: parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode.

[67] Reference ::= EntityRef | CharRef

Parameters
ctxtan XML parser context

xmlParsePEReference ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParsePEReference(xmlParserCtxtPtrctxt)

xmlParsePEReference: parse PEReference declarations The entity content is handled directly by pushing it's content as a new input stream.

[69] PEReference ::= '' Name ';'

[ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly.

[ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it...

[ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it...

[ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled.

Parameters
ctxtan XML parser context

xmlParseDocTypeDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseDocTypeDecl(xmlParserCtxtPtrctxt)

xmlParseDocTypeDecl: parse a DOCTYPE declaration

[28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '>'

[ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element.

Parameters
ctxtan XML parser context

xmlParseAttribute ( xmlParserCtxtPtr, xmlChar ** )

XMLPUBFUN const xmlChar *XMLCALLxmlParseAttribute(xmlParserCtxtPtrctxt,
xmlChar **value
)

xmlParseStartTag ( xmlParserCtxtPtr )

XMLPUBFUN const xmlChar *XMLCALLxmlParseStartTag(xmlParserCtxtPtrctxt)

xmlParseEndTag ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseEndTag(xmlParserCtxtPtrctxt)

xmlParseCDSect ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseCDSect(xmlParserCtxtPtrctxt)

xmlParseCDSect: Parse escaped pure raw content.

[18] CDSect ::= CDStart CData CDEnd

[19] CDStart ::= '<![CDATA['

[20] Data ::= (Char* - (Char* ']]>' Char*))

[21] CDEnd ::= ']]>'

Parameters
ctxtan XML parser context

xmlParseContent ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseContent(xmlParserCtxtPtrctxt)

xmlParseContent: Parse a content:

[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

Parameters
ctxtan XML parser context

xmlParseElement ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseElement(xmlParserCtxtPtrctxt)

xmlParseElement: parse an XML element, this is highly recursive

[39] element ::= EmptyElemTag | STag content ETag

[ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.

Parameters
ctxtan XML parser context

xmlParseVersionNum ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseVersionNum(xmlParserCtxtPtrctxt)

xmlParseVersionNum: parse the XML version value.

[26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+

Returns the string giving the XML version number, or NULL

OOM: possible --> sets OOM flag when NULL is returned

Parameters
ctxtan XML parser context

xmlParseVersionInfo ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseVersionInfo(xmlParserCtxtPtrctxt)

xmlParseVersionInfo: parse the XML version.

[24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S?

Returns the version string, e.g. "1.0"

OOM:

Parameters
ctxtan XML parser context

xmlParseEncName ( xmlParserCtxtPtr )

XMLPUBFUN xmlChar *XMLCALLxmlParseEncName(xmlParserCtxtPtrctxt)

xmlParseEncName: parse the XML encoding name

[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*

Returns the encoding name value or NULL

Parameters
ctxtan XML parser context

xmlParseEncodingDecl ( xmlParserCtxtPtr )

XMLPUBFUN const xmlChar *XMLCALLxmlParseEncodingDecl(xmlParserCtxtPtrctxt)

xmlParseEncodingDecl: parse the XML encoding declaration

[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")

this setups the conversion filters.

Returns the encoding value or NULL

Parameters
ctxtan XML parser context

xmlParseSDDecl ( xmlParserCtxtPtr )

XMLPUBFUN int XMLCALLxmlParseSDDecl(xmlParserCtxtPtrctxt)

xmlParseSDDecl: parse the XML standalone declaration

[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"'))

[ VC: Standalone Document Declaration ] The standalone document declaration must have the value "no" if any external markup declarations contain declarations of:
  • attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or

  • entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or

  • attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or

  • element types with element content, if white space occurs directly within any instance of those types.

Returns 1 if standalone, 0 otherwise

Parameters
ctxtan XML parser context

xmlParseXMLDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseXMLDecl(xmlParserCtxtPtrctxt)

xmlParseXMLDecl: parse an XML declaration header

[23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

OOM:

Parameters
ctxtan XML parser context

xmlParseTextDecl ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseTextDecl(xmlParserCtxtPtrctxt)

xmlParseTextDecl: parse an XML declaration header for external entities

[77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'

Question: Seems that EncodingDecl is mandatory ? Is that a typo ?

Parameters
ctxtan XML parser context

xmlParseMisc ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParseMisc(xmlParserCtxtPtrctxt)

xmlParseMisc: parse an XML Misc* optional field.

[27] Misc ::= Comment | PI | S

Parameters
ctxtan XML parser context

xmlParseExternalSubset ( xmlParserCtxtPtr, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlParseExternalSubset(xmlParserCtxtPtrctxt,
const xmlChar *ExternalID,
const xmlChar *SystemID
)

xmlParseExternalSubset: parse Markup declarations from an external subset

[30] extSubset ::= textDecl? extSubsetDecl

[31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *

Parameters
ctxtan XML parser context
ExternalIDthe external identifier
SystemIDthe system identifier (or URL)

XML_SUBSTITUTE_NONE

XML_SUBSTITUTE_NONE:

If no entities need to be substituted.

XML_SUBSTITUTE_REF

XML_SUBSTITUTE_REF:

Whether general entities need to be substituted.

XML_SUBSTITUTE_PEREF

XML_SUBSTITUTE_PEREF:

Whether parameter entities need to be substituted.

XML_SUBSTITUTE_BOTH

XML_SUBSTITUTE_BOTH:

Both general and parameter entities need to be substituted.

xmlDecodeEntities ( xmlParserCtxtPtr, int, int, xmlChar, xmlChar, xmlChar )

XMLPUBFUN xmlChar *XMLCALLxmlDecodeEntities(xmlParserCtxtPtrctxt,
intlen,
intwhat,
xmlCharend,
xmlCharend2,
xmlCharend3
)

xmlStringDecodeEntities ( xmlParserCtxtPtr, const xmlChar *, int, xmlChar, xmlChar, xmlChar )

XMLPUBFUN xmlChar *XMLCALLxmlStringDecodeEntities(xmlParserCtxtPtrctxt,
const xmlChar *str,
intwhat,
xmlCharend,
xmlCharend2,
xmlCharend3
)

xmlStringDecodeEntities: Takes a entity string content and process to do the adequate substitutions.

[67] Reference ::= EntityRef | CharRef

[69] PEReference ::= '' Name ';'

Returns A newly allocated string with the substitution done. The caller must deallocate it !

Parameters
ctxtthe parser context
strthe input string
whatcombination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
endan end marker xmlChar, 0 if none
end2an end marker xmlChar, 0 if none
end3an end marker xmlChar, 0 if none

xmlStringLenDecodeEntities ( xmlParserCtxtPtr, const xmlChar *, int, int, xmlChar, xmlChar, xmlChar )

XMLPUBFUN xmlChar *XMLCALLxmlStringLenDecodeEntities(xmlParserCtxtPtrctxt,
const xmlChar *str,
intlen,
intwhat,
xmlCharend,
xmlCharend2,
xmlCharend3
)

xmlStringLenDecodeEntities: Takes a entity string content and process to do the adequate substitutions.

[67] Reference ::= EntityRef | CharRef

[69] PEReference ::= '' Name ';'

Returns A newly allocated string with the substitution done. The caller must deallocate it !

Parameters
ctxtthe parser context
strthe input string
lenthe string length
whatcombination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
endan end marker xmlChar, 0 if none
end2an end marker xmlChar, 0 if none
end3an end marker xmlChar, 0 if none

nodePush ( xmlParserCtxtPtr, xmlNodePtr )

XMLPUBFUN int XMLCALLnodePush(xmlParserCtxtPtrctxt,
xmlNodePtrvalue
)

nodePush: Pushes a new element node on top of the node stack

Returns 0 in case of error, the index in the stack otherwise

Parameters
ctxtan XML parser context
valuethe element node

nodePop ( xmlParserCtxtPtr )

XMLPUBFUN xmlNodePtr XMLCALLnodePop(xmlParserCtxtPtrctxt)

nodePop: Pops the top element node from the node stack

Returns the node just removed

Parameters
ctxtan XML parser context

inputPush ( xmlParserCtxtPtr, xmlParserInputPtr )

XMLPUBFUN int XMLCALLinputPush(xmlParserCtxtPtrctxt,
xmlParserInputPtrvalue
)

inputPush: Pushes a new parser input on top of the input stack

Returns -1 in case of error, the index in the stack otherwise

OOM: possible --> returns -1 and OOM flag is set

Parameters
ctxtan XML parser context
valuethe parser input

inputPop ( xmlParserCtxtPtr )

XMLPUBFUN xmlParserInputPtr XMLCALLinputPop(xmlParserCtxtPtrctxt)

inputPop: Pops the top parser input from the input stack

Returns the input just removed

Parameters
ctxtan XML parser context

namePop ( xmlParserCtxtPtr )

XMLPUBFUN const xmlChar *XMLCALLnamePop(xmlParserCtxtPtrctxt)

namePop: Pops the top element name from the name stack

Returns the name just removed

Parameters
ctxtan XML parser context

namePush ( xmlParserCtxtPtr, const xmlChar * )

XMLPUBFUN int XMLCALLnamePush(xmlParserCtxtPtrctxt,
const xmlChar *value
)

namePush: Pushes a new element name on top of the name stack

Returns -1 in case of error, the index in the stack otherwise

Parameters
ctxtan XML parser context
valuethe element name

xmlSkipBlankChars ( xmlParserCtxtPtr )

XMLPUBFUN int XMLCALLxmlSkipBlankChars(xmlParserCtxtPtrctxt)

xmlSkipBlankChars: skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point.

Returns the number of space chars skipped

OOM: possible -->

Parameters
ctxtthe XML parser context

xmlStringCurrentChar ( xmlParserCtxtPtr, const xmlChar *, int * )

XMLPUBFUN int XMLCALLxmlStringCurrentChar(xmlParserCtxtPtrctxt,
const xmlChar *cur,
int *len
)

xmlStringCurrentChar: The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.

Returns the current char value and its length

Parameters
ctxtthe XML parser context
curpointer to the beginning of the char
lenpointer to the length of the char read

xmlParserHandlePEReference ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParserHandlePEReference(xmlParserCtxtPtrctxt)

xmlParserHandlePEReference: [69] PEReference ::= '' Name ';'

[ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly.

[ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it...

[ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it...

[ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled.

A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e.
  • Included in literal in entity values

  • Included as Parameter Entity reference within DTDs

OOM: possible ------ review NOT FINISHED YET

Parameters
ctxtthe parser context

xmlParserHandleReference ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlParserHandleReference(xmlParserCtxtPtrctxt)

xmlCheckLanguageID ( const xmlChar * )

XMLPUBFUN int XMLCALLxmlCheckLanguageID(const xmlChar *lang)

xmlCheckLanguageID: Checks that the value conforms to the LanguageID production:

NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition.

[33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+

Returns 1 if correct 0 otherwise

Parameters
langpointer to the string value

xmlCurrentChar ( xmlParserCtxtPtr, int * )

XMLPUBFUN int XMLCALLxmlCurrentChar(xmlParserCtxtPtrctxt,
int *len
)

xmlCurrentChar: The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)

Returns the current char value and its length

OOM: possible --> OOM flag is set when returns 0

Parameters
ctxtthe XML parser context
lenpointer to the length of the char read

xmlCopyCharMultiByte ( xmlChar *, int )

XMLPUBFUN int XMLCALLxmlCopyCharMultiByte(xmlChar *out,
intval
)

xmlCopyCharMultiByte: append the char value in the array

Returns the number of xmlChar written

OOM: never

Parameters
outpointer to an array of xmlChar
valthe char value

xmlCopyChar ( int, xmlChar *, int )

XMLPUBFUN int XMLCALLxmlCopyChar(intlen,
xmlChar *out,
intval
)

xmlCopyChar: append the char value in the array

Returns the number of xmlChar written

Parameters
lenIgnored, compatibility
outpointer to an array of xmlChar
valthe char value

xmlNextChar ( xmlParserCtxtPtr )

XMLPUBFUN void XMLCALLxmlNextChar(xmlParserCtxtPtrctxt)

xmlNextChar: Skip to the next char input char.

OOM (REVIEW NOT FINISHED): possible --> check OOM flag

Parameters
ctxtthe XML parser context

xmlParserInputShrink ( xmlParserInputPtr )

XMLPUBFUN void XMLCALLxmlParserInputShrink(xmlParserInputPtrin)

xmlParserInputShrink: This function removes used input for the parser.

Parameters
inan XML parser input

Typedef xmlEntityReferenceFunc

typedef void(*xmlEntityReferenceFunc

xmlEntityReferenceFunc: Callback function used when one needs to be able to track back the provenance of a chunk of nodes inherited from an entity replacement.

xmlSetEntityReferenceFunc ( xmlEntityReferenceFunc )

XMLPUBFUN void XMLCALLxmlSetEntityReferenceFunc(xmlEntityReferenceFuncfunc)

IS_DATA_NODE

IS_BINARY_NODE

IS_RCHUNK_NODE

IS_RFILE_NODE

IS_EXTERNAL_NODE

TEXT_IS_DATA

given text node, check if it represents data node

TEXT_IS_BINARY

given text node, check if it represents binary node

TEXT_IS_EXTERNAL

given text node, check if it represents external node

DATA_NODE_CID

fetches data node cid