alex masselot wrote:
Hello
I'm not familiar with xerces in c++
Currently, we parse xml file with perl (typically XML::Twig) and java
(dom4j).
With both API, there is a very comfortable way to mix Sax/DOM, by
setting handlers to some elements paths.
The xml file is parsed, then once a defined paths is reached, the
element is considered and given to a handler subroutines.
All the subtree can be explored with domlike call (xpath etc.) as a
memory stored element.
Then, the tree can be purged, thus the memory released
It's a job for Active Tags and the XML Control Language !
XCL pipelines are working in the same way in RefleX (the engine) ;
however, you can also use XPath directly on SAX streams :
you can define XPath patterns for filtering (like with XSLT) except that
large files are supported as well
additionally, you can "cast" a tree or a subtree from DOM to SAX or SAX
to DOM at will
here are some examples :
http://reflex.gforge.inria.fr/saxPatterns.html#N802B53 http://reflex.gforge.inria.fr/tutorial.html#N801C30
and the slides that were shown at <XML2006in Boston :
http://disc.inria.fr/perso/philippe....ctive-tags.pdf (pages 7
and 8)
>
It's a quite convenient merge, to get the best of two worlds.
this is also my opinion ; you can achieve very complex things thanks to
very few active tags
>
Is ithat possible with xerces in c++???
sure ! as you explain it yourself, it's not a question of language
I cannot find any simple answer in apache doc
thanks
Alex
--
Cordialement,
///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
-----------------------------
http://reflex.gforge.inria.fr/
Have the RefleX !