FeedParse.cpp 780 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "Main.h"
  2. #include "FeedParse.h"
  3. #include "RFCDate.h"
  4. #include "RSSParse.h"
  5. #include "AtomParse.h"
  6. #ifdef DEBUG
  7. #include <iostream>
  8. static void DisplayNodes(XMLNode &node)
  9. {
  10. XMLNode::NodeMap::iterator nodeItr;
  11. for (nodeItr = node.nodes.begin();nodeItr != node.nodes.end(); nodeItr++)
  12. {
  13. for (XMLNode::NodeList::iterator itr = nodeItr->second.begin(); itr != nodeItr->second.end(); itr++)
  14. {
  15. std::wcerr << L"<" << nodeItr->first << L">" << std::endl;
  16. DisplayNodes(**itr);
  17. std::wcerr << L"</" << nodeItr->first << L">" << std::endl;
  18. }
  19. }
  20. }
  21. #endif
  22. void FeedParse::ReadNodes(const wchar_t *url)
  23. {
  24. const XMLNode *curNode = xmlDOM.GetRoot();
  25. curNode = curNode->Get(L"rss");
  26. if (curNode)
  27. {
  28. ReadRSS(curNode, sync, loadingOwnFeed, url);
  29. return ;
  30. }
  31. }