* @param content the content
* @throws ParsingException if there is a problem parsing the content
*/
protected void parse( String content ) {
Tokenizer tokenizer = new CndTokenizer(false, false);
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, outputPath);
} else {
Position position = tokens.previousPosition();
throw new ParsingException(position, CndI18n.expectedNamespaceOrNodeDefinition.text(tokens.consume(),
position.getLine(),
position.getColumn()));
}
}
}