! !$Author: joelevin $ !$Date: 2011-03-24 11:33:26 -0500 (Thu, 24 Mar 2011) $ !$Revision: 11724 $ !$HeadURL: https://svn.weru.ksu.edu/weru/weps1/trunk/weps.src/src/util/lib_sax/tstsax2/MyHandler02.f95 $ ! ! ! Other Handlers ! module myhandler02 use flib_sax integer, save :: indentation contains ! START DOC subroutine start_document() write(*,*) "===> Document has Begun <===" indentation = 0 end subroutine start_document ! START ELEMENT subroutine start_element(name,attributes) character(len=*), intent(in) :: name type(dictionary_t), intent(in) :: attributes call indent(indentation) write(*,*) "OPEN: ", name indentation = indentation + 2; end subroutine start_element ! END ELEMENT subroutine end_element(name) character(len=*), intent(in) :: name indentation = indentation - 2; call indent(indentation); write(*,*) "SHUT: ", name; end subroutine end_element ! END DOC subroutine end_document() write(*,*) "===> Document has Ended <===" end subroutine end_document ! non SAX Method for indenting the output subroutine indent(ind) integer :: ind, i do i=1,ind write(*,'(a)', advance="no") " " enddo end subroutine indent end module myhandler02