Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name | Tag name. |
||
type(xml_tag), | intent(in) | :: | content | Tag value as nested tag.. |
||
character(len=*), | intent(in), | optional | :: | attribute(1:) | Attribute name/value pair [1:2]. |
|
character(len=*), | intent(in), | optional | :: | attributes(1:,1:) | Attributes list of name/value pairs [1:2,1:]. |
|
character(len=*), | intent(in), | optional | :: | attributes_stream | Attributes list of name/value pairs as single stream. |
|
logical, | intent(in), | optional | :: | sanitize_attributes_value | Sanitize attributes value. |
|
integer(kind=I4P), | intent(in), | optional | :: | indent | Number of indent-white-spaces. |
|
logical, | intent(in), | optional | :: | is_content_indented | Activate value indentation. |
XML tag.
Return an instance of xml tag with value being a nested tag.
Attributes are passed by array.
pure function create_tag_nested(name, content, attribute, attributes, attributes_stream, sanitize_attributes_value, indent, &
is_content_indented) result(tag)
!---------------------------------------------------------------------------------------------------------------------------------
!< Return an instance of xml tag with value being a nested tag.
!<
!< Attributes are passed by array.
!---------------------------------------------------------------------------------------------------------------------------------
character(*), intent(in) :: name !< Tag name.
type(xml_tag), intent(in) :: content !< Tag value as nested tag..
character(*), intent(in), optional :: attribute(1:) !< Attribute name/value pair [1:2].
character(*), intent(in), optional :: attributes(1:,1:) !< Attributes list of name/value pairs [1:2,1:].
character(*), intent(in), optional :: attributes_stream !< Attributes list of name/value pairs as single stream.
logical, intent(in), optional :: sanitize_attributes_value !< Sanitize attributes value.
integer(I4P), intent(in), optional :: indent !< Number of indent-white-spaces.
logical, intent(in), optional :: is_content_indented !< Activate value indentation.
type(xml_tag) :: tag !< XML tag.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
call tag%set(name=name, attribute=attribute, attributes=attributes, content=content%stringify(), &
sanitize_attributes_value=sanitize_attributes_value, attributes_stream=attributes_stream, indent=indent, &
is_content_indented=is_content_indented)
!---------------------------------------------------------------------------------------------------------------------------------
endfunction create_tag_nested