private static void ReadStates(GraphFsm graphFsm, XPathNavigator navigator) { var nodosEstado = navigator.Select("section[@name='xgml']/section[@name='graph']/section[@name='node']"); foreach (XPathNavigator nodo in nodosEstado) { var state = string.Empty; var id = 0; var line = string.Empty; var shape = string.Empty; var value = nodo.Select("attribute[@key='label']"); if (value.MoveNext()) state = value.Current.Value; value = nodo.Select("attribute[@key='id']"); if (value.MoveNext()) id = value.Current.ValueAsInt; value = nodo.Select("section[@name='graphics']/attribute[@key='outlineStyle']"); if (value.MoveNext()) line = value.Current.Value; value = nodo.Select("section[@name='graphics']/attribute[@key='type']"); if (value.MoveNext()) shape = value.Current.Value; graphFsm.AddState(id, state, line, shape, nodosEstado.Count); } }
private static void ReadStates(GraphFsm graphFsm, XPathNavigator navigator) { var nodosEstado = navigator.Select("section[@name='xgml']/section[@name='graph']/section[@name='node']"); foreach (XPathNavigator nodo in nodosEstado) { var state = string.Empty; var id = 0; var line = string.Empty; var shape = string.Empty; var value = nodo.Select("attribute[@key='label']"); if (value.MoveNext()) { state = value.Current.Value; } value = nodo.Select("attribute[@key='id']"); if (value.MoveNext()) { id = value.Current.ValueAsInt; } value = nodo.Select("section[@name='graphics']/attribute[@key='outlineStyle']"); if (value.MoveNext()) { line = value.Current.Value; } value = nodo.Select("section[@name='graphics']/attribute[@key='type']"); if (value.MoveNext()) { shape = value.Current.Value; } graphFsm.AddState(id, state, line, shape, nodosEstado.Count); } }