Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
8a00b3f2
Commit
8a00b3f2
authored
Feb 15, 2010
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This should fix <tag/> cases.
parent
1478e543
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
share/lua/modules/simplexml.lua
share/lua/modules/simplexml.lua
+20
-0
No files found.
share/lua/modules/simplexml.lua
View file @
8a00b3f2
...
@@ -52,6 +52,26 @@ local function parsexml(stream)
...
@@ -52,6 +52,26 @@ local function parsexml(stream)
tree
=
node
tree
=
node
elseif
nodetype
==
'endelem'
then
elseif
nodetype
==
'endelem'
then
if
#
parents
>
0
then
if
#
parents
>
0
then
local
name
=
reader
:
name
()
local
tmp
=
{}
--print(name, tree.name, #parents)
while
name
~=
tree
.
name
do
if
#
parents
==
0
then
error
(
"XML parser error/faulty logic"
)
end
local
child
=
tree
tree
=
parents
[
#
parents
]
table.remove
(
parents
)
table.remove
(
tree
.
children
)
table.insert
(
tmp
,
1
,
child
)
for
i
,
node
in
pairs
(
child
.
children
)
do
table.insert
(
tmp
,
i
+
1
,
node
)
end
child
.
children
=
{}
end
for
_
,
node
in
pairs
(
tmp
)
do
table.insert
(
tree
.
children
,
node
)
end
tree
=
parents
[
#
parents
]
tree
=
parents
[
#
parents
]
table.remove
(
parents
)
table.remove
(
parents
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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