⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
»
SaxonC
Overview
Issues
Calendar
Blog
Forums
Files
Download (942 Bytes)
Bug #5858
» test.pyw
Pierre Dostie
, 2023-01-26 17:10
import
os
# Global Variable Path
def
resource_path
(
relative
):
return
os
.
path
.
join
(
os
.
environ
.
get
(
"_MEIPASS2"
,
os
.
path
.
abspath
(
"."
)
),
relative
)
path
=
resource_path
(
relative
=
""
)
from
saxonche
import
PySaxonProcessor
import
nodekind
#stylesheet = os.path.join(path,"configs\\stylesheets\\test.xslt")
stylesheet
=
"test.xslt"
outfile
=
"out.xml"
list_xml_file
=
[
'<Address>'
]
list_xml_file
.
append
(
"<name>Alex</name>"
)
list_xml_file
.
append
(
"<lastname>Mathew</lastname>"
)
list_xml_file
.
append
(
'</Address>'
)
file_xml
=
' '
.
join
(
map
(
str
,
list_xml_file
))
proc_define
=
PySaxonProcessor
(
license
=
False
)
xsltproc_define
=
proc_define
.
new_xslt30_processor
()
executable
=
xsltproc_define
.
compile_stylesheet
(
stylesheet_file
=
stylesheet
)
node
=
proc_define
.
parse_xml
(
xml_text
=
file_xml
)
executable
.
transform_to_file
(
output_file
=
outfile
,
xdm_node
=
node
)
« Previous
1
2
Next »
(1-1/2)
Loading...