private void ProcessStatement( XElement node )
{
string delimiter = "-------------------------------------- {0} {1} --------------------------------------";
XAttribute typeAttribute = node.Attribute( "type" );
XAttribute procRefIdAttribute = node.Attribute( "proc_refid" );
XAttribute refIdAttribute = node.Attribute( "refid" );
if (typeAttribute != null)
{
string statementType = typeAttribute.Value;
if ("PERFORM".Equals( statementType ))
{
ProcessProcedure( procRefIdAttribute, refIdAttribute, delimiter );
}
else if ("IF THEN".Equals(statementType))
{
XElement statements = node.XPathSelectElement(string.Format("statements" ));
if (statements != null)
{
foreach (XElement xElement in statements.Elements())
{
ProcessStatement( xElement );
}
}
}
else
{
LogManager.Trace( string.Format( "Statement {0}", node.Attribute( "type" ).Value ) );
}
}
}