OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: high level XML handling

[ Lists Home | Date Index | Thread Index ]
  • From: Wojtek Sobczuk <sopel@system.pl>
  • To: Eugene Kuznetsov <eugene@datapower.com>
  • Date: Mon, 1 May 2000 17:24:33 +0200

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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS