mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-10-16 19:33:48 +03:00
31 lines
954 B
Python
31 lines
954 B
Python
#
|
|
# GPOA - GPO Applier for Linux
|
|
#
|
|
# Copyright (C) 2019-2020 BaseALT Ltd.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.<Paste>
|
|
|
|
from xml.etree import ElementTree
|
|
|
|
|
|
def get_xml_root(xml_file):
|
|
'''
|
|
Get top-level element of XML file from disk.
|
|
'''
|
|
xml_contents = ElementTree.parse(xml_file)
|
|
xml_root = xml_contents.getroot()
|
|
|
|
return xml_root
|
|
|