Here is an example of using a custom link tag, in this case just printing the URL, which illustrates registering a tag:
class PrintingLinkTag extends LinkTag { public void doSemanticAction () throws ParserException { System.out.println (getLink ()); } } PrototypicalNodeFactory factory = new PrototypicalNodeFactory (); factory.registerTag (new PrintingLinkTag ()); Parser parser = new Parser (); parser.setNodeFactory (factory);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|