Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1086074c
Commit
1086074c
authored
Nov 24, 2011
by
Hugo Beauzée-Luyssen
Committed by
Rémi Denis-Courmont
Nov 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: DOMHelper: Adding a helper to get the first child element.
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
1f722296
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
modules/stream_filter/dash/xml/DOMHelper.cpp
modules/stream_filter/dash/xml/DOMHelper.cpp
+12
-0
modules/stream_filter/dash/xml/DOMHelper.h
modules/stream_filter/dash/xml/DOMHelper.h
+1
-0
No files found.
modules/stream_filter/dash/xml/DOMHelper.cpp
View file @
1086074c
...
...
@@ -40,6 +40,7 @@ std::vector<Node *> DOMHelper::getElementByTagName (Node *root, std::string
return
elements
;
}
std
::
vector
<
Node
*>
DOMHelper
::
getChildElementByTagName
(
Node
*
root
,
std
::
string
name
)
{
std
::
vector
<
Node
*>
elements
;
...
...
@@ -52,6 +53,7 @@ std::vector<Node *> DOMHelper::getChildElementByTagName (Node *root, std::string
return
elements
;
}
void
DOMHelper
::
getElementsByTagName
(
Node
*
root
,
std
::
string
name
,
std
::
vector
<
Node
*>
*
elements
,
bool
selfContain
)
{
if
(
!
selfContain
&&
!
root
->
getName
().
compare
(
name
))
...
...
@@ -68,3 +70,13 @@ void DOMHelper::getElementsByTagName (Node *root, std::string
getElementsByTagName
(
root
->
getSubNodes
().
at
(
i
),
name
,
elements
,
selfContain
);
}
}
Node
*
DOMHelper
::
getFirstChildElementByName
(
Node
*
root
,
const
std
::
string
&
name
)
{
for
(
size_t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
{
if
(
!
root
->
getSubNodes
().
at
(
i
)
->
getName
().
compare
(
name
)
)
return
root
->
getSubNodes
().
at
(
i
);
}
return
NULL
;
}
modules/stream_filter/dash/xml/DOMHelper.h
View file @
1086074c
...
...
@@ -39,6 +39,7 @@ namespace dash
public:
static
std
::
vector
<
Node
*>
getElementByTagName
(
Node
*
root
,
std
::
string
name
,
bool
selfContain
);
static
std
::
vector
<
Node
*>
getChildElementByTagName
(
Node
*
root
,
std
::
string
name
);
static
Node
*
getFirstChildElementByName
(
Node
*
root
,
const
std
::
string
&
name
);
private:
static
void
getElementsByTagName
(
Node
*
root
,
std
::
string
name
,
std
::
vector
<
Node
*>
*
elements
,
bool
selfContain
);
...
...
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