protected void parse ( String content ) { Tokenizer tokenizer = new CndTokenizer ( false , true ) ; TokenStream tokens = new TokenStream ( content , tokenizer , false ) ; tokens . start ( ) ; while ( tokens . hasNext ( ) ) { // Keep reading while we can recognize one of the two types of statements ... if ( tokens . matches ( "<" , ANY_VALUE , "=" , ANY_VALUE , ">" ) ) { parseNamespaceMapping ( tokens ) ; } else if ( tokens . matches ( "[" , ANY_VALUE , "]" ) ) { parseNodeTypeDefinition ( tokens ) ; } else { Position position = tokens . previousPosition ( ) ; throw new ParsingException ( position , CndI18n . expectedNamespaceOrNodeDefinition . text ( tokens . consume ( ) , position . getLine ( ) , position . getColumn ( ) ) ) ; } } }
Parse the CND content .