コード例 #1
0
		virtual void startElement(const std::string& /* namespaceURI */, const std::string& /* localName */, const std::string& qName, const AttributesT& atts)
		{
			switch(s)
			{
			case S_INIT:
				if(qName == "div" && atts.getValue("id") == "shelves")
					s = S_SHELVES;
			break;
			case S_SHELVES:
				if(qName == "a")
					f({atts.getValue("title"), atts.getValue("href")});
			break;
			case S_DONE:
				//Do nothing
			break;
			}
		}
コード例 #2
0
  void startElement(const AttributesT& atts)
  {
    ++depth_;
    string_type base = atts.getValue(xbc_.xml_uri, xbc_.base);
    if(base.empty())
      return;

    string_type baseURI = absolutise(currentBase(), base);
    bases_.push(std::make_pair(depth_, baseURI));
  } // startElement