Set the state for each node when reading the extraction pattern from XML file.