1 // file : XSCRT/Parser.hpp
2 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
3 #ifndef XSCRT_PARSER_HPP
4 #define XSCRT_PARSER_HPP
8 #include "ace/XML_Utils/XSCRT/XML.hpp"
16 Parser (XML::Element
<C
> const& e
)
17 : e_ (e
.dom_element ()->getChildNodes ()), ei_ (0),
18 a_ (e
.dom_element ()->getAttributes ()), ai_ (0)
23 more_elements () const
25 return e_
->getLength () > ei_
;
31 return XML::Element
<C
> (XML::dom_cast
<xercesc::DOMElement
*> (e_
->item (ei_
++)));
35 more_attributes () const
37 return a_
->getLength () > ai_
;
43 return XML::Attribute
<C
> (
44 XML::dom_cast
<xercesc::DOMAttr
*> (a_
->item (ai_
++)));
48 xercesc::DOMNodeList
const* e_
;
51 xercesc::DOMNamedNodeMap
const* a_
;
55 Parser (Parser
const&);
58 operator= (Parser
const&);
62 #endif // XSCRT_PARSER_HPP