ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapperOld/SiteMapper.cpp
(Generate patch)

Comparing SiteMapper/SiteMapper.cpp (file contents):
Revision 138 by Douglas Thrift, 2004-03-25T15:52:54-08:00 vs.
Revision 139 by Douglas Thrift, 2004-03-25T16:10:22-08:00

# Line 122 | Line 122 | void SiteMapper::index(const string& sit
122          if (document == 0) return;
123  
124          address = evaluator.createXPath(XalanDOMString("address").c_str());
125        path = evaluator.createXPath(XalanDOMString("path").c_str());
125          port = evaluator.createXPath(XalanDOMString("port").c_str());
126 +        path = evaluator.createXPath(XalanDOMString("path").c_str());
127          title = evaluator.createXPath(XalanDOMString("title").c_str());
128          
129          NodeRefList nodes = evaluator.selectNodeList(support, document,
# Line 132 | Line 132 | void SiteMapper::index(const string& sit
132          for (int index = 0; index < nodes.getLength(); index++)
133          {
134                  XalanNode* node = nodes.item(index);
135 +                ostringstream address;
136 +
137 +                address << evaluator.evaluate(support, node, *(this->address))->str();
138 +
139 +                double port = evaluator.evaluate(support, node, *(this->port))->num();
140 +
141 +                if (port >= 0 && port <= 65535)
142 +                {
143 +                        address << ':' << int(port);
144 +                }
145 +
146 +                cerr << address.str() << '\n';
147          }
148  
149          evaluator.destroyXPath(address);
138        evaluator.destroyXPath(path);
150          evaluator.destroyXPath(port);
151 +        evaluator.destroyXPath(path);
152          evaluator.destroyXPath(title);
153   }
154  
# Line 144 | Line 156 | void SiteMapper::newMap(const string& si
156   {
157          //
158  
159 <        for (int index = 0; index < pages.size(); index++)
160 <        {
161 <                cout << pages[index] << '\n';
162 <        }
159 > //      for (int index = 0; index < pages.size(); index++)
160 > //      {
161 > //              cout << pages[index] << '\n';
162 > //      }
163   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines