Changeset 378
- Timestamp:
- Mon Feb 25 14:41:36 2008
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
-
scripts/trunk/Print - Export/Export Database as XML.py
r377 r378 29 29 # 080213 - Brian - first version of XML export based on Save as Script by Alexander V. Christensen 30 30 # 080214 - Brian - added 'rows', 'columns', and 'column' (column would be a good place to add type info) 31 # 080225 - Brian - added export date and time to database element 31 32 32 33 import os 34 import datetime 33 35 # import xml.sax.saxutils 34 36 … … 36 38 # these tables will be omitted 37 39 38 IgnoreColumns = [ 'ID',"ServerKey", 'OwnerKey', 'EditKey', 'ViewKey', 'WebEditKey', 'WebViewKey']40 IgnoreColumns = ["ServerKey", 'OwnerKey', 'EditKey', 'ViewKey', 'WebEditKey', 'WebViewKey'] 38 40 # these columns will be omitted 39 41 40 FirstColumns = ['Name', 'Label'] 42 FirstColumns = ['ID', 'Name', 'Label'] 40 42 # these columns will be listed before the rest 41 43 … … 48 50 49 51 preface = """<?xml version="1.0" encoding="UTF-8"?>""" 52 dToday = datetime.datetime.today() # returns datetime object for now 53 # date = dToday.strftime("%y-%m-%d %H:%M") # convert to display format 54 date = dToday.strftime("%y-%m-%d") # convert to display format 55 time = dToday.strftime("%H:%M") # convert to display format 56 50 57 header = """<!-- """ + signature + """ --> 51 <Database> 52 """ 58 <Database date="%s" time="%s"> 59 """ % (date, time) 53 60 54 61 footer = """</Database>
