Changeset 613:c57d80a649ea in documentViewer for MpiwgXmlTextServer.py
- Timestamp:
- Oct 17, 2013, 2:25:39 PM (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MpiwgXmlTextServer.py
r610 r613 12 12 from datetime import datetime 13 13 14 from SrvTxtUtils import getInt, getText, getHttpData 14 from SrvTxtUtils import getInt, getText, getHttpData, serialize 15 15 16 16 # mapping of fields in the output of /mpiwg-mpdl-cms-web/query/GetDocInfo to documentViewer docinfo … … 23 23 'countTocEntries' : 'numTocEntries' 24 24 } 25 26 def serialize(node):27 """returns a string containing an XML snippet of node"""28 s = ET.tostring(node, 'UTF-8')29 # snip off XML declaration30 if s.startswith('<?xml'):31 i = s.find('?>')32 return s[i+3:]33 34 return s35 25 36 26
Note: See TracChangeset
for help on using the changeset viewer.