repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
new tool
[hband-tools.git]
/
user-tools
/
xml2json
blob
de72507691ca3f0ada9570dd933b4c8bd5563119
1
#!/usr/bin/env python
2
3
"""
4
=pod
5
6
=head1 NAME
7
8
xml2json - Convert XML input to JSON
9
10
=cut
11
12
"""
13
14
import
sys
15
import
xmltodict
16
import
json
17
18
print
(
json
.
dumps
(
xmltodict
.
parse
(
''
.
join
(
sys
.
stdin
.
readlines
()))))