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, |
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 |
|
|
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 |
|
} |