core-extra/daemon/core/misc/xmlwriter.py
tgoff0 08c9fd8bf5 daemon: Initial support for exporting a scenario using the new NRL
Network Modeling Framework (NMF) XML representation.
2015-05-22 00:53:01 +00:00

15 lines
468 B
Python

# CORE
# Copyright (c) 2015 The Boeing Company.
# See the LICENSE file included in this distribution.
from xmlwriter0 import CoreDocumentWriter0
from xmlwriter1 import CoreDocumentWriter1
def core_document_writer(session, version):
if version == '0.0':
doc = CoreDocumentWriter0(session)
elif version == '1.0':
doc = CoreDocumentWriter1(session)
else:
raise ValueError, 'unsupported document version: %s' % version
return doc