June 2000
Intermediate to advanced
556 pages
8h 45m
English
Perhaps the most striking change in the code is the handling of all the command-line options in the code. There are nine on/off options to xgrep at this point. We could have separate variables for each one, like this.
CD-ROM reference=8009.txt MarkHits = 0 UseEventStyle = 0 UseTreeStyle = 0 Validate = 0 MatchAttributeName = 0 MatchAttributeValue = 0 MatchProcessingInstruction = 0 MatchElementTypeName = 0 MatchCharacterData = 0
We could then set these to 1 as required when processing the results from getopt. We could then pass them into XMLGrepEvents, where they would be needed to decide how to perform matches.
An alternative approach has been used that keeps all the boolean variables ...
Read now
Unlock full access