private void readProcessingInstructions ( final Document doc ) { final NodeList docNodes = doc . getChildNodes ( ) ; for ( int i = 0 ; i < docNodes . getLength ( ) ; i ++ ) { final Node node = docNodes . item ( i ) ; if ( node . getNodeType ( ) == Node . PROCESSING_INSTRUCTION_NODE ) { final ProcessingInstruction pi = ( ProcessingInstruction ) node ; switch ( pi . getNodeName ( ) ) { case PI_WORKDIR_TARGET : workdir = pi ; break ; case PI_WORKDIR_TARGET_URI : workdirUrl = pi ; break ; case PI_PATH2PROJ_TARGET : path2proj = pi ; break ; case PI_PATH2PROJ_TARGET_URI : path2projUrl = pi ; break ; case PI_PATH2ROOTMAP_TARGET_URI : path2rootmapUrl = pi ; break ; } } } }
Read processing metadata from processing instructions .