Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KWH40
fml40-reference-implementation
Commits
24ab89fd
Commit
24ab89fd
authored
May 26, 2021
by
Jiahang Chen
Browse files
change xml class
parent
9fa23bd8
Pipeline
#475032
passed with stages
in 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ml/tools.py
View file @
24ab89fd
...
...
@@ -199,9 +199,12 @@ def find_nodes(self, path):
new_path
=
""
for
_path
in
path_list
:
if
":"
not
in
_path
:
_path
=
"
standford_ns:{}"
.
format
(
_path
)
_path
=
"
{"
+
self
.
_namespace
.
get
(
''
)
+
"}"
+
_path
new_path
+=
_path
new_path
+=
"/"
if
new_path
[
-
1
]
==
"/"
:
new_path
=
new_path
[:
-
1
]
return
self
.
root
.
find
(
new_path
,
self
.
_namespace
)
return
self
.
root
.
findall
(
new_path
,
self
.
_namespace
)
def
to_string
(
self
,
root
):
return
self
.
et
.
tostring
(
root
,
"unicode"
,
"xml"
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment