[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: high level XML handling
On Mon, May 01, 2000 at 09:53:51AM -0400, Eugene Kuznetsov wrote: > If it's simple enough, you could just use a list of tags & handlers on top of an event-based parser. For more complicated things, you would need a state machine or a stack of some kind. Eventually, when it gets complex and general enough, it makes sense to have a tree -- although probably nothing as complex as DOM. > hey, well.. the first approach i've taken are arrays of functions who handle given tags at certain levels, each handler has another array of handlers and so on. this results in large amounts of code. the problem is that i'm dealing with tags containing attributes, and i want to make the parser as general as possible. if i only dealt with tags (no attribu- tes) (as in <TAG attribute="value">), i could then make a tree of tags, go down it, and write handler functions only for the leaves. but because of the attributes, such an approach gets very complicated. i am wondering whether it makes any sense to use XML for my task. which is inter-daemon communication. a php3 script collects data from the user, converts it to XML and sends commands to the daemon i'm writing. is this good usage for XML? or is there some easier way to handle this, without all the parsing fuss? could You point me to a piece of software doing a similiar thing as mine? greetings, Wojtek *************************************************************************** This is xml-dev, the mailing list for XML developers. To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev List archives are available at http://xml.org/archives/xml-dev/ ***************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|