FoXy XML file class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I4P), | private | :: | Nt | = | 0 | Number of XML tags. |
|
type(xml_tag), | private, | allocatable | :: | tag(:) | XML tags array. |
final :: finalize | Free dynamic memory when finalizing. |
procedure, public :: free | Free dynamic memory. |
procedure, public :: parse | Parse xml data from string or file. |
procedure, public :: content | Return tag content of tag named name. |
procedure, public :: stringify | Convert the whole file data into a string. |
procedure, public :: add_tag | Add tag to XML file. |
procedure, public :: delete_tag | Add tag from XML file. |
procedure, private :: parse_from_string | Parse xml data from string. |
XML file class.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(in) | :: | self | XML file. |
||
character(len=*), | intent(in) | :: | name | Tag name. |
Tag content.
Return tag content of tag named name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(in) | :: | self | XML file. |
Output string containing the whole xml file.
Convert the whole file data into a string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename | File name. |
||
character(len=*), | intent(in), | optional | :: | delimiter_start | Delimiter from which start the stream. |
|
character(len=*), | intent(in), | optional | :: | delimiter_end | Delimiter to which end the stream. |
|
logical, | intent(in), | optional | :: | fast_read | Flag for activating efficient reading with one single read. |
|
integer(kind=I4P), | intent(out), | optional | :: | iostat | IO error. |
|
character(len=*), | intent(out), | optional | :: | iomsg | IO error message. |
Output string containing the file data as a single stream.
Load file contents and store as single characters stream.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self | XML file. |
Free dynamic memory.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(xml_file), | intent(inout) | :: | file | XML file. |
Free dynamic memory when finalizing.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self | XML file. |
||
character(len=*), | intent(in), | optional | :: | string | String containing xml data. |
|
character(len=*), | intent(in), | optional | :: | filename | File name containing xml data. |
Parse xml data from string or file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self | XML file. |
||
character(len=*), | intent(in) | :: | name | XML tag name. |
Delete tag from XML file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_file), | intent(inout) | :: | self | XML file. |
||
character(len=*), | intent(in) | :: | source_string | String containing xml data. |
Parse xml data from string.