Re: parsing and string processing
Jeremy Kloth <[email protected]>
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Organization | Fourthought, Inc. |
| Message-ID | <[email protected]> |
On Thursday 27 October 2005 4:46 pm, Dave wrote: > I looked at the source code but couldn't understand > exactly what getAtts and scanAtts do. What I'm trying > to find out is if they do any sort of string/pattern > matching. For the most part, they do *character* matching. The XML specification defines the sets of characters that are allowed at any given point in a XML document. > Or maybe a general question, do xml parsers > do string/pattern matching a lot? Some parsers are implemented by using regular expressions (is that what you mean by "string/pattern matching"?). Expat does basically the same thing, just unrolled in very optimized sub-functions for the respective non-terminals defined in the specification. > If yes, how much does it affect performance? It is basically a fact of life for any tokenizing lexer, be it a compiler, a XML parser, regular expression engine and what-not, the list is quite endless in the programming world. > Thank you for your help! No problem, however I am curious as to the fascination with "string/pattern matching" as I seen basically this same message on the xml-sig list. -- Jeremy Kloth Fourthought, Inc. http://fourthought.com/ http://4suite.org/