Skip to content

foxy_xml_tag ​

FoXy XML tag class.

Source: src/lib/foxy_xml_tag.F90

Dependencies

Contents ​

Derived Types ​

xml_tag ​

XML tag class.

A valid XML tag must have the following syntax for a tag without a content (with only attributes):

xml
   <Tag_Name att#1_Name="att#1_val" att#2_Name="att#2_val"... att#Nt_Name="att#Nt_val"/>

while a tag with a content must have the following syntax:

xml
   <Tag_Name att#1_Name="att#1_val" att#2_Name="att#2_val"... att#Nt_Name="att#Nt_val">Tag_Content</Tag_Name>

It is worth noting that the syntax is case sensitive and that the attributes are optional. Sources (parse, get_content, attributes streams) are read by the document tokenizer: attribute values are single or double quoted, blanks are allowed around =.

Components ​

NameTypeAttributesDescription
tag_nametype(string)Tag name.
tag_contenttype(string)Tag content.
tag_tailtype(string)Text after the end tag, up to the next sibling or the
posinteger(kind=I8P)Characters position (in source) indexes (start, content, end).
attributetype(string)allocatableAttributes names/values pairs, [1:2, 1:].
attributes_numberinteger(kind=I4P)Number of defined attributes.
indentinteger(kind=I4P)Number of indent-white-spaces.
is_self_closinglogicalSelf closing tag flag.
levelinteger(kind=I4P)Tag hierarchy level.
idinteger(kind=I4P)Uniq tag ID.
parent_idinteger(kind=I4P)Uniq ID of parent tag.
children_numberinteger(kind=I4P)Number of children tags.
child_idinteger(kind=I4P)allocatableUniq ID of children tags.

Type-Bound Procedures ​

NameAttributesDescription
add_attributesAdd attributes name/value pairs.
add_child_idpass(self)Add child ID to children IDs list.
attributespass(self)Return attributes name/value pairs as string.
delete_attributesDelete attributes name/value pairs.
delete_contentpass(self)Delete tag conent.
end_tagpass(self)Return `` end tag.
freepass(self)Free (reset) tag.
get_contentpass(self)Return tag content.
get_attributepass(self)Return the value of the attribute named name.
get_attribute_namepass(self)Return the name of the attribute with a given index.
get_attributes_numberpass(self)Return the number of attributes.
get_idpass(self)Return tag uniq ID.
get_indentpass(self)Return tag indentation.
get_levelpass(self)Return tag hierarchy level.
get_parent_idpass(self)Return parent tag uniq ID.
get_pospass(self)Return tag positions in the source.
get_tailpass(self)Return the text after the end tag.
is_attribute_presentpass(self)Return .true. it the queried attribute name is defined.
is_namedpass(self)Return .true. if the tag is named name.
is_content_markuppass(self)Return .true. if the content may hold markup.
is_parsedpass(self)Check is tag is correctly parsed, i.e. its tag_name is allocated.
namepass(self)Return tag name.
parsepass(self)Parse the tag contained into a source string.
self_closing_tagpass(self)Return `` self closing tag.
setpass(self)Set tag data.
start_tagpass(self)Return `` start tag.
stringifypass(self)Convert the whole tag into a string.
writepass(self)Write tag to unit file.
assignment(=)Assignment operator overloading.
add_single_attributepass(self)Add one attribute name/value pair.
add_attribute_valuepass(self)Add one attribute, value stored exactly.
add_multiple_attributespass(self)Add list of attributes name/value pairs.
add_stream_attributespass(self)Add list of attributes name/value pairs passed as stream.
delete_single_attributepass(self)Delete one attribute name/value pair.
delete_multiple_attributespass(self)Delete list of attributes name/value pairs.
assign_tagpass(lhs)Assignment between two tags.

attribute_pair ​

An attribute of the found tag.

Components ​

NameTypeAttributesDescription
namecharacter(len=:)allocatableAttribute name.
valuecharacter(len=:)allocatableAttribute value.

tag_builder ​

Builder of a single tag of a source, driven by the tokenizer: the first tag or, if name is allocated, the first tag with that name (tags inside CDATA sections, comments and PIs excluded); the tokenizer stops once it is complete.

@note The found tag is held by plain components, not by an xml_tag: nvfortran corrupts a local builder holding one.

Inheritance

Extends: xml_builder

Components ​

NameTypeAttributesDescription
is_stoppedlogicalSet by the builder to stop the tokenizer (checked after each complete start or end tag).
namecharacter(len=:)allocatableName of the searched tag, unallocated for the first tag.
sanitizelogicalTrim leading and trailing spaces of attribute values.
tag_namecharacter(len=:)allocatableFound tag name.
pairstype(attribute_pair)allocatableFound tag attributes.
nainteger(kind=I4P)Number of attributes of the found tag.
idinteger(kind=I4P)Tokenizer ID of the found tag, 0 if none.
startinteger(kind=I8P)Position of the start tag <.
open_endinteger(kind=I8P)Position of the start tag >, 0 if unterminated.
end_startinteger(kind=I8P)Position of the end tag <, 0 if none.
end_endinteger(kind=I8P)Position of the end tag >, 0 if none.
is_self_closinglogicalThe found tag is self closing.

Type-Bound Procedures ​

NameAttributesDescription
start_tagpass(self)A start tag begins.
attributepass(self)An attribute of the current start tag.
start_tag_endpass(self)The current start tag is complete.
end_tagpass(self)An open tag is closed by its end tag.
datapass(self)Character data or other markup: ignored.
problempass(self)A problem of malformed input: ignored.

Interfaces ​

xml_tag ​

Overload xml_tag with creator procedures.

Module procedures: create_tag_flat, create_tag_nested

Subroutines ​

add_child_id ​

Add child ID to children IDs list.

Attributes: pure

fortran
subroutine add_child_id(self, child_id)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
child_idinteger(kind=I4P)inChild ID.

Call graph

free ​

Free (reset) tag.

Attributes: elemental

fortran
subroutine free(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.

get_content ​

Return tag content of self (or its nested tags) if named name.

@note A nested tag is the first tag named name in the content string (tags inside CDATA sections, comments and PIs excluded); its content is returned raw, as in the string. @note If there is no value, the content string is returned deallocated.

Attributes: pure

fortran
subroutine get_content(self, name, content)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
namecharacter(len=*)inSearched tag name.
contentcharacter(len=:)outallocatableTag content.

Call graph

parse ​

Parse the first tag contained into a source string: its name, attributes (values as in the source) and content (raw, nested tags included); the other tags eventually present are omitted.

Valid syntax are:

  • <tag_name att1="att1 val" att2='att2 val'...>...</tag_name>
  • <tag_name att1="att1 val" att2='att2 val'.../>

@note The source is read by the document tokenizer: <, >, = and the other quote kind are allowed in attribute values, the content ends at the matching end tag (nested tags with the same name included) or, if the tag is unclosed, at the source end. The tag positions pos are set; the name, attributes and content are replaced (the name is unallocated if there is no tag).

Attributes: elemental

fortran
subroutine parse(self, source, tstart, tend)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
sourcecharacter(len=*)inString containing the input.
tstartinteger(kind=I8P)outoptionalStarting index of tag inside the string, 0 if there is no tag.
tendinteger(kind=I8P)outoptionalEnding index of tag inside the string, 0 if there is no tag.

Call graph

set ​

Set tag data.

Attributes: pure

fortran
subroutine set(self, name, attribute, attributes, attributes_stream, sanitize_attributes_value, content, pos, indent, is_content_indented, is_self_closing, id, level, parent_id, attributes_stream_alloc, content_alloc, tail, attribute_name, attribute_value)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
namecharacter(len=*)inoptionalTag name.
attributecharacter(len=*)inoptionalAttribute name/value pair [1:2].
attributescharacter(len=*)inoptionalAttributes list of name/value pairs [1:2,1:].
attributes_streamcharacter(len=*)inoptionalAttributes list of name/value pairs as stream.
sanitize_attributes_valuelogicalinoptionalSanitize attributes value.
contentcharacter(len=*)inoptionalTag value.
posinteger(kind=I8P)inoptionalCharacters position (in source) indexes.
indentinteger(kind=I4P)inoptionalNumber of indent-white-spaces.
is_content_indentedlogicalinoptionalActivate value indentation.
is_self_closinglogicalinoptionalThe tag is self closing.
idinteger(kind=I4P)inoptionalUniq ID.
levelinteger(kind=I4P)inoptionalTag hierarchy level.
parent_idinteger(kind=I4P)inoptionalParent uniq ID.
attributes_stream_alloccharacter(len=:)inallocatable, optionalAttributes list stream, allocatable input.
content_alloccharacter(len=:)inallocatable, optionalTag value, allocatable input.
tailcharacter(len=*)inoptionalText after the end tag.
attribute_namecharacter(len=*)inoptionalAttribute name, with attribute_value.
attribute_valuecharacter(len=*)inoptionalAttribute value, stored exactly (unless

Call graph

write_tag ​

Write tag to unit file.

@note form is 'UNFORMATTED' (the default, a stream unit) or 'FORMATTED', in any case: another one writes nothing, iostat is XML_BAD_VALUE. @note Without iostat, an error (a bad form, a failed write) stops the program with its message, as Fortran I/O statements do.

fortran
subroutine write_tag(self, unit, is_indented, is_content_indented, form, end_record, only_start, only_content, only_end, iostat, iomsg)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
unitinteger(kind=I4P)inFile unit.
is_indentedlogicalinoptionalActivate content indentation.
is_content_indentedlogicalinoptionalActivate content indentation.
formcharacter(len=*)inoptionalFormat.
end_recordcharacter(len=*)inoptionalEnding record.
only_startlogicalinoptionalWrite only start tag.
only_contentlogicalinoptionalWrite only content.
only_endlogicalinoptionalWrite only end tag.
iostatinteger(kind=I4P)outoptionalIO status.
iomsgcharacter(len=*)outoptionalIO message.

Call graph

add_single_attribute ​

Add one attribute name/value pair.

@note Leading and trailing white spaces are trimmed out by attribute's name. @note The pair elements have the same length: a value shorter than the name is padded with trailing spaces (use add_attribute_value to store a value exactly).

Attributes: pure

fortran
subroutine add_single_attribute(self, attribute, sanitize_value)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
attributecharacter(len=*)inAttribute name/value pair [1:2].
sanitize_valuelogicalinoptionalSanitize attribute value.

Call graph

add_attribute_value ​

Add one attribute, or update its value if already present; the value is stored exactly, unless sanitized (leading and trailing spaces trimmed).

Attributes: pure

fortran
subroutine add_attribute_value(self, name, value, sanitize_value)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
namecharacter(len=*)inAttribute name.
valuecharacter(len=*)inAttribute value.
sanitize_valuelogicalinoptionalSanitize attribute value.

Call graph

add_multiple_attributes ​

Add list of attributes name/value pairs.

Attributes: pure

fortran
subroutine add_multiple_attributes(self, attributes, sanitize_values)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
attributescharacter(len=*)inAttribute name/value pair list [1:2,1:].
sanitize_valueslogicalinoptionalSanitize attribute values.

Call graph

add_stream_attributes ​

Add list of attributes name/value pairs passed as stream, e.g. x="1" y='a > b'.

@note The stream is read by the document tokenizer as the attributes of a start tag: values are single or double quoted (<, >, = and the other quote kind allowed), blanks are allowed around =; values are stored as in the stream (unless sanitized), an existing attribute is updated.

Attributes: pure

fortran
subroutine add_stream_attributes(self, attributes_stream, sanitize_values)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
attributes_streamcharacter(len=*)inAttribute name/value pair list passed as stream.
sanitize_valueslogicalinoptionalSanitize attribute values.

Call graph

delete_content ​

Delete tag content.

Attributes: pure

fortran
subroutine delete_content(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.

delete_single_attribute ​

Delete one attribute name/value pair.

Attributes: pure

fortran
subroutine delete_single_attribute(self, name)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
namecharacter(len=*)inAttribute name.

Call graph

delete_multiple_attributes ​

Delete list of attributes name/value pairs.

Attributes: pure

fortran
subroutine delete_multiple_attributes(self, name)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inoutXML tag.
namecharacter(len=*)inAttributes names.

Call graph

scan_tag ​

Scan a source for its first tag or, if name is passed, its first tag with that name.

Attributes: pure

fortran
subroutine scan_tag(source, sanitize, builder, name)

Arguments

NameTypeIntentAttributesDescription
sourcecharacter(len=*)inSource.
sanitizelogicalinTrim leading and trailing spaces of attribute values.
buildertype(tag_builder)outSingle tag builder, the found tag.
namecharacter(len=*)inoptionalName of the searched tag.

Call graph

tag_content ​

Return the content (raw) of the tag found by a builder: up to its end tag or, if unclosed, to the source end; unallocated if it is self closing or empty.

Attributes: pure

fortran
subroutine tag_content(source, builder, content)

Arguments

NameTypeIntentAttributesDescription
sourcecharacter(len=*)inSource.
buildertype(tag_builder)inSingle tag builder, the found tag.
contentcharacter(len=:)outallocatableTag content.

Call graph

tag_start_tag ​

A start tag begins: it is the found tag if none is found yet and it is the searched one.

Attributes: pure

fortran
subroutine tag_start_tag(self, id, parent_id, level, name, start)

Arguments

NameTypeIntentAttributesDescription
selfclass(tag_builder)inoutSingle tag builder.
idinteger(kind=I4P)inTag ID (start tags count).
parent_idinteger(kind=I4P)inParent tag ID, 0 for a root tag.
levelinteger(kind=I4P)inTag level, 1 for a root tag.
namecharacter(len=*)inTag name.
startinteger(kind=I8P)inPosition of <.

tag_attribute ​

An attribute of the current start tag: stored if it is of the found tag.

Attributes: pure

fortran
subroutine tag_attribute(self, id, name, value)

Arguments

NameTypeIntentAttributesDescription
selfclass(tag_builder)inoutSingle tag builder.
idinteger(kind=I4P)inTag ID.
namecharacter(len=*)inAttribute name.
valuecharacter(len=*)inAttribute value.

tag_start_tag_end ​

The current start tag is complete: a found self closing tag is complete, the tokenizer stops.

Attributes: pure

fortran
subroutine tag_start_tag_end(self, id, start, open_end, is_self_closing)

Arguments

NameTypeIntentAttributesDescription
selfclass(tag_builder)inoutSingle tag builder.
idinteger(kind=I4P)inTag ID.
startinteger(kind=I8P)inPosition of <.
open_endinteger(kind=I8P)inPosition of >.
is_self_closinglogicalinThe tag is self closing.

tag_end_tag ​

An open tag is closed by its end tag: the found tag is complete, the tokenizer stops.

Attributes: pure

fortran
subroutine tag_end_tag(self, id, start, open_end, end_start, end_end)

Arguments

NameTypeIntentAttributesDescription
selfclass(tag_builder)inoutSingle tag builder.
idinteger(kind=I4P)inTag ID.
startinteger(kind=I8P)inPosition of the start tag <.
open_endinteger(kind=I8P)inPosition of the start tag >.
end_startinteger(kind=I8P)inPosition of the end tag <.
end_endinteger(kind=I8P)inPosition of the end tag >.

tag_data ​

Character data or other markup: ignored (the content is cut from the source).

Attributes: pure

fortran
subroutine tag_data(self, kind, chars, first)

Arguments

NameTypeIntentAttributesDescription
selfclass(tag_builder)inoutSingle tag builder.
kindinteger(kind=I4P)inData kind, DATA_*.
charscharacter(len=*)inCharacters, as in the source.
firstinteger(kind=I8P)inPosition of the first character.

tag_problem ​

A problem of malformed input: ignored (parsing is tolerant).

Attributes: pure

fortran
subroutine tag_problem(self, pos, message)

Arguments

NameTypeIntentAttributesDescription
selfclass(tag_builder)inoutSingle tag builder.
posinteger(kind=I8P)inPosition of the problem.
messagecharacter(len=*)inProblem description.

assign_tag ​

Assignment between two tags.

Attributes: elemental

fortran
subroutine assign_tag(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(xml_tag)inoutLeft hand side.
rhstype(xml_tag)inRight hand side.

finalize ​

Free dynamic memory when finalizing.

Attributes: elemental

fortran
subroutine finalize(tag)

Arguments

NameTypeIntentAttributesDescription
tagtype(xml_tag)inoutXML tag.

Functions ​

create_tag_flat ​

Return an instance of xml tag.

Attributes: pure

Returns: type(xml_tag)

fortran
function create_tag_flat(name, attribute, attributes, attributes_stream, sanitize_attributes_value, pos, content, indent, is_content_indented, is_self_closing, id, level, parent_id, attributes_stream_alloc, content_alloc) result(tag)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inTag name.
attributecharacter(len=*)inoptionalAttribute name/value pair [1:2].
attributescharacter(len=*)inoptionalAttributes list of name/value pairs [1:2,1:].
attributes_streamcharacter(len=*)inoptionalAttributes list as single stream.
sanitize_attributes_valuelogicalinoptionalSanitize attributes value.
posinteger(kind=I8P)inoptionalCharacters position (in source) indexes.
contentcharacter(len=*)inoptionalTag value.
indentinteger(kind=I4P)inoptionalNumber of indent-white-spaces.
is_content_indentedlogicalinoptionalActivate content indentation.
is_self_closinglogicalinoptionalThe tag is self closing.
idinteger(kind=I4P)inoptionalUniq ID.
levelinteger(kind=I4P)inoptionalTag hierarchy level.
parent_idinteger(kind=I4P)inoptionalParent uniq ID.
attributes_stream_alloccharacter(len=:)inallocatable, optionalAttributes list stream, allocatable input.
content_alloccharacter(len=:)inallocatable, optionalTag value, allocatable input.

Call graph

create_tag_nested ​

Return an instance of xml tag with value being a nested tag.

Attributes: pure

Returns: type(xml_tag)

fortran
function create_tag_nested(name, content, attribute, attributes, attributes_stream, sanitize_attributes_value, pos, indent, is_content_indented, id, level, parent_id, attributes_stream_alloc, content_alloc) result(tag)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inTag name.
contenttype(xml_tag)inTag value as nested tag..
attributecharacter(len=*)inoptionalAttribute name/value pair [1:2].
attributescharacter(len=*)inoptionalAttributes list of name/value pairs [1:2,1:].
attributes_streamcharacter(len=*)inoptionalAttributes list as single stream.
sanitize_attributes_valuelogicalinoptionalSanitize attributes value.
posinteger(kind=I8P)inoptionalCharacters position (in source) indexes.
indentinteger(kind=I4P)inoptionalNumber of indent-white-spaces.
is_content_indentedlogicalinoptionalActivate value indentation.
idinteger(kind=I4P)inoptionalUniq ID.
levelinteger(kind=I4P)inoptionalTag hierarchy level.
parent_idinteger(kind=I4P)inoptionalParent uniq ID.
attributes_stream_alloccharacter(len=:)inallocatable, optionalAttributes list stream, allocatable input.
content_alloccharacter(len=:)inallocatable, optionalTag value, allocatable input.

Call graph

attributes ​

Return attributes name/value pairs as string, '' if the tag has none.

Attributes: pure

Returns: character(len=:)

fortran
function attributes(self) result(att_)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

end_tag ​

Return </tag_name> end tag.

Attributes: pure

Returns: character(len=:)

fortran
function end_tag(self, is_indented) result(tag_)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
is_indentedlogicalinoptionalActivate content indentation.

Call graph

get_attribute_name ​

Return the name of the attribute with index a (1 for the first one, in source order), empty if it does not exist.

Attributes: pure

Returns: character(len=:)

fortran
function get_attribute_name(self, a) result(name)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
ainteger(kind=I4P)inAttribute index.

Call graph

get_attributes_number ​

Return the number of attributes.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function get_attributes_number(self) result(number)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

get_attribute ​

Return the value of the attribute named name.

@note If the attribute is not defined (or has no value), an empty string is returned. The value is normalized as by XML 1.0 (3.3.3), for attributes of CDATA type: each literal blank (tab, new line, carriage return, a CR LF pair as one) becomes a space, then character references are decoded (blanks written as references are kept).

Attributes: pure

Returns: character(len=:)

fortran
function get_attribute(self, name) result(value)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
namecharacter(len=*)inAttribute name.

Call graph

get_id ​

Return tag uniq ID.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function get_id(self) result(id)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

get_tail ​

Return the text after the end tag (mixed content), an empty string if none.

Attributes: pure

Returns: character(len=:)

fortran
function get_tail(self) result(tail)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

get_parent_id ​

Return parent tag uniq ID.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function get_parent_id(self) result(parent_id)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

get_indent ​

Return tag indentation (number of spaces).

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function get_indent(self) result(indent)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

get_level ​

Return tag hierarchy level.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function get_level(self) result(level)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

get_pos ​

Return tag positions in the source: start tag <, start tag >, end tag < (-1 if self closing, 0 if unclosed).

Attributes: pure

Returns: integer(kind=I8P)

fortran
function get_pos(self) result(pos)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

is_attribute_present ​

Return .true. it the queried attribute name is defined, .false. otherwise.

Attributes: pure

Returns: logical

fortran
function is_attribute_present(self, name) result(is_present)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
namecharacter(len=*)inAttribute name.

Call graph

is_parsed ​

Check is tag is correctly parsed, i.e. its tag_name is allocated.

Attributes: elemental

Returns: logical

fortran
function is_parsed(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

is_content_markup ​

Return true if the content holds a < (it may hold markup, e.g. nested tags), without copying it.

Attributes: elemental

Returns: logical

fortran
function is_content_markup(self) result(is_markup)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

is_named ​

Return true if the tag is named name (no copy of the name, for lookups).

Attributes: elemental

Returns: logical

fortran
function is_named(self, name) result(is_match)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
namecharacter(len=*)inName.

Call graph

name ​

Return tag name.

Attributes: pure

Returns: character(len=:)

fortran
function name(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.

Call graph

self_closing_tag ​

Return <tag_name.../> self closing tag.

Attributes: pure

Returns: character(len=:)

fortran
function self_closing_tag(self, is_indented) result(tag_)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
is_indentedlogicalinoptionalFlag to check if tag is indented.

Call graph

start_tag ​

Return <tag_name...> start tag.

Attributes: pure

Returns: character(len=:)

fortran
function start_tag(self, is_indented) result(tag_)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
is_indentedlogicalinoptionalFlag to check if tag is indented.

Call graph

stringify ​

Convert the whole tag into a string.

Attributes: pure

Returns: character(len=:)

fortran
function stringify(self, is_indented, is_content_indented, only_start, only_content, only_end, linearize) result(stringed)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_tag)inXML tag.
is_indentedlogicalinoptionalActivate content indentation.
is_content_indentedlogicalinoptionalActivate content indentation.
only_startlogicalinoptionalWrite only start tag.
only_contentlogicalinoptionalWrite only content.
only_endlogicalinoptionalWrite only end tag.
linearizelogicalinoptionalReturn a "linearized" string of tags without the XML hieararchy.

Call graph