[lug] Looking for C++ help

Ken Weinert kenw at ihs.com
Thu Feb 22 11:41:29 MST 2001

* Tkil (tkil at scrye.com) [010222 04:22]:
> >>>>> "Ken" == Ken Weinert <kenw at ihs.com> writes:
> Ken> relevant tags. My question is this: is there an easy/elegant way
> Ken> of taking the the startElementEvent of onsgmls and dispatching
> Ken> the collected data into my document class?
> after a quick glance through the OpenSP docs:
>    http://openjade.sourceforge.net/doc-1.4/index.htm
> i have to ask -- what data are you trying to dispatch and record?

	Well, due to the inability of one of the other groups here to
just give me data (don't ask, it's a long, sordid story) I have to parse
the data I want out of the SGMl feed they send to our customers. What I
was trying to do was tap into nsgmls and piggy back off of their event
detection to write out the data I need.

> i'm also not clear what you mean by "writing a flat file, maintaining
> relationships".  relationships between what?

	Oh, data relationships, not anything implicit to the SGML

> from what little i know of SGML, you can take a broad view where
> elements have three things that they "own":  their identification,
> their attributes, and their contents.  which of those three are you
> trying to record for later?


  <nice example code elided>

> still "maintains relationships".  that's rather what SGML does quite
> well, so I'm not sure what you're trying to do here.  (maybe reduce an 
> arbitrarily deep tree to two values (parent, child) on each line?)

	Trying to extract data, keep the data relationships together
(which is meta-knowledge, based on my understanding of the documents,
although it is reflected in the DTD and document instances.)

> anyway.  hopefully this has given you some ideas.  i have a fair pile
> of examples that are similar in spirit, despite being written in a
> very different language (perl, using libwww-perl's HTML::Parser
> class).
> hope this helps,

	It has been helpful - gives me an idea or two that I hadn't
considered. My C++ experience has been mostly classroom (where it all
made sense) and not much Real Life followup because C++ isn't in great
use here and I've been discouraged from using it extensively because
there'd be no one to take over my code if I change jobs/positions :)

	Thanks again for the extensive reply - this has always been a
good forum to ask slightly off-the-wall/topic questions of and get
thoughtful replies.

Ken Weinert   kenw at ihs.com 303-858-6956 (V) 303-705-4258 (F)
GnuPG KeyID: 9274F1CE           GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
It's easier to believe in God than to accept the blame ourselves
     - Solomon Short

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20010222/fc0bb37f/attachment.pgp>

More information about the LUG mailing list