foxy_test_delete_content Program

Uses

  • program~~foxy_test_delete_content~~UsesGraph program~foxy_test_delete_content foxy_test_delete_content module~foxy foxy program~foxy_test_delete_content->module~foxy module~foxy_xml_file foxy_xml_file module~foxy->module~foxy_xml_file module~foxy_xml_tag foxy_xml_tag module~foxy->module~foxy_xml_tag module~penf~6 penf module~foxy->module~penf~6 module~foxy_xml_file->module~foxy_xml_tag module~foxy_xml_file->module~penf~6 module~foxy_xml_tag->module~penf~6 module~stringifor stringifor module~foxy_xml_tag->module~stringifor module~penf_allocatable_memory~2 penf_allocatable_memory module~penf~6->module~penf_allocatable_memory~2 module~penf_b_size~2 penf_b_size module~penf~6->module~penf_b_size~2 module~penf_global_parameters_variables~3 penf_global_parameters_variables module~penf~6->module~penf_global_parameters_variables~3 module~penf_stringify~4 penf_stringify module~penf~6->module~penf_stringify~4 module~penf_allocatable_memory~2->module~penf_global_parameters_variables~3 module~penf_allocatable_memory~2->module~penf_stringify~4 iso_fortran_env iso_fortran_env module~penf_allocatable_memory~2->iso_fortran_env module~penf_b_size~2->module~penf_global_parameters_variables~3 module~penf_stringify~4->module~penf_b_size~2 module~penf_stringify~4->module~penf_global_parameters_variables~3 module~penf_stringify~4->iso_fortran_env module~stringifor->module~penf~6 module~stringifor_string_t~2 stringifor_string_t module~stringifor->module~stringifor_string_t~2 module~stringifor_string_t~2->module~penf~6 module~stringifor_string_t~2->iso_fortran_env module~befor64~3 befor64 module~stringifor_string_t~2->module~befor64~3 module~face~3 face module~stringifor_string_t~2->module~face~3 module~befor64~3->module~penf~6 module~befor64_pack_data_m befor64_pack_data_m module~befor64~3->module~befor64_pack_data_m module~face~3->iso_fortran_env module~befor64_pack_data_m->module~penf~6

Calls

program~~foxy_test_delete_content~~CallsGraph program~foxy_test_delete_content foxy_test_delete_content proc~delete_content xml_tag%delete_content program~foxy_test_delete_content->proc~delete_content proc~stringify xml_tag%stringify program~foxy_test_delete_content->proc~stringify interface~str str proc~stringify->interface~str proc~attributes xml_tag%attributes proc~stringify->proc~attributes proc~chars string%chars proc~stringify->proc~chars proc~end_tag xml_tag%end_tag proc~stringify->proc~end_tag proc~is_allocated string%is_allocated proc~stringify->proc~is_allocated proc~self_closing_tag xml_tag%self_closing_tag proc~stringify->proc~self_closing_tag proc~start_tag xml_tag%start_tag proc~stringify->proc~start_tag proc~str_a_i1p str_a_I1P interface~str->proc~str_a_i1p proc~str_a_i2p str_a_I2P interface~str->proc~str_a_i2p proc~str_a_i4p str_a_I4P interface~str->proc~str_a_i4p proc~str_a_i8p str_a_I8P interface~str->proc~str_a_i8p proc~str_a_r4p str_a_R4P interface~str->proc~str_a_r4p proc~str_a_r8p str_a_R8P interface~str->proc~str_a_r8p proc~str_bol str_bol interface~str->proc~str_bol proc~str_i1p str_I1P interface~str->proc~str_i1p proc~str_i2p str_I2P interface~str->proc~str_i2p proc~str_i4p str_I4P interface~str->proc~str_i4p proc~str_i8p str_I8P interface~str->proc~str_i8p proc~str_r4p str_R4P interface~str->proc~str_r4p proc~str_r8p str_R8P interface~str->proc~str_r8p proc~strf_i1p strf_I1P interface~str->proc~strf_i1p proc~strf_i2p strf_I2P interface~str->proc~strf_i2p proc~strf_i4p strf_I4P interface~str->proc~strf_i4p proc~strf_i8p strf_I8P interface~str->proc~strf_i8p proc~strf_r4p strf_R4P interface~str->proc~strf_r4p proc~strf_r8p strf_R8P interface~str->proc~strf_r8p proc~self_closing_tag->proc~attributes proc~start_tag->proc~attributes proc~str_a_i1p->proc~str_i1p proc~str_a_i2p->proc~str_i2p proc~str_a_i4p->proc~str_i4p proc~str_a_i8p->proc~str_i8p proc~str_a_r4p->proc~str_r4p proc~str_a_r8p->proc~str_r8p proc~compact_real_string compact_real_string proc~str_r4p->proc~compact_real_string proc~str_r8p->proc~compact_real_string

Variables

Type Attributes Name Initial
character(len=:), allocatable :: source
character(len=:), allocatable :: parsed
type(xml_tag) :: a_tag
logical :: test_passed(1)

Source Code

program foxy_test_delete_content
!< FoXy test.
use foxy, only: xml_tag

implicit none
character(len=:), allocatable :: source         !< String containing the source XML data.
character(len=:), allocatable :: parsed         !< String containing the parsed XML data.
type(xml_tag)                 :: a_tag          !< XML tag handler.
logical                       :: test_passed(1) !< List of passed tests.

test_passed = .false.

print "(A)", 'source'
source = '<first x="1" y="c" z="2">lorem ipsum...</first>'
print "(A)", source

print "(A)", 'delete content'
a_tag = xml_tag(name='first', content='lorem ipsum...', attributes=reshape([['x', '1'], ['y', 'c'], ['z', '2']], [2,3]))
call a_tag%delete_content()
parsed = a_tag%stringify()
source = '<first x="1" y="c" z="2"></first>'
test_passed(1) = trim(adjustl(source))==trim(adjustl(parsed))
print "(A,L1)", parsed//' Is correct? ', test_passed(1)

print "(A,L1)", new_line('a')//'Are all tests passed? ', all(test_passed)
endprogram foxy_test_delete_content