Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 209:fd3d631dd977
*** empty log message ***
| author | abukhman |
|---|---|
| date | Fri, 08 Oct 2010 14:02:36 +0200 |
| parents | 0882bad5ac48 |
| children | 50a666145096 |
comparison
equal
deleted
inserted
replaced
| 208:0882bad5ac48 | 209:fd3d631dd977 |
|---|---|
| 201 for l in links: | 201 for l in links: |
| 202 hrefNode =l.getAttributeNodeNS(None, u"href") | 202 hrefNode =l.getAttributeNodeNS(None, u"href") |
| 203 if hrefNode: | 203 if hrefNode: |
| 204 href=hrefNode.nodeValue | 204 href=hrefNode.nodeValue |
| 205 if href.startswith('http://chinagis.mpiwg-berlin.mpg.de'): | 205 if href.startswith('http://chinagis.mpiwg-berlin.mpg.de'): |
| 206 hrefNode.nodeValue =href.replace('chinagis_REST','chinagis') | 206 page= hrefNode.nodeValue =href.replace('chinagis_REST','chinagis') |
| 207 hrefNode.nodeValue=href.replace('/chgis','') | 207 text=page.replace('/chgis','') |
| 208 l.setAttributeNS(None, 'target', '_blank') | 208 l.setAttributeNS(None, 'target', '_blank') |
| 209 return serializeNode(pagenode) | 209 return serializeNode(text) |
| 210 | 210 |
| 211 if mode == "pureXml": | 211 if mode == "pureXml": |
| 212 # first div contains text | 212 # first div contains text |
| 213 pagedivs = pagedom.xpath("/div") | 213 pagedivs = pagedom.xpath("/div") |
| 214 if len(pagedivs) > 0: | 214 if len(pagedivs) > 0: |
