Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I4P), | private | :: | Nt | = | 0 | ||
type(xml_tag), | private, | allocatable | :: | tag(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self | |||
character, | intent(in) | :: | name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self | |||
character, | intent(in) | :: | source_string |
type, public:: xml_file
!< XML file class.
!<
!< @todo The "delete" facility is incomplete: nested tags are not taken into account. Better support will with the
!< "dom" facility.
private
integer(I4P) :: Nt = 0 !< Number of XML tags.
type(xml_tag), allocatable :: tag(:) !< XML tags array.
contains
! public methods
procedure :: free !< Free dynamic memory.
procedure :: parse !< Parse xml data from string or file.
procedure :: content !< Return tag content of tag named *name*.
procedure :: stringify !< Convert the whole file data into a string.
procedure :: add_tag !< Add tag to XML file.
procedure :: delete_tag !< Add tag from XML file.
final :: finalize !< Free dynamic memory when finalizing.
! private methods
procedure, private :: parse_from_string !< Parse xml data from string.
endtype xml_file