Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kirill Terekhov
INMOST
Commits
25787484
Commit
25787484
authored
Jun 04, 2017
by
Kirill Terekhov
Browse files
Features in xml reader
GetAttrib and GetChild by name
parent
5d85d826
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Headers/inmost_xml.h
View file @
25787484
...
...
@@ -180,7 +180,7 @@ namespace INMOST
///Retrive attribute number n.
const
XMLAttrib
&
GetAttib
(
int
n
)
const
{
return
attributes
[
n
];}
///Retrive attribute number n.
XMLAttrib
&
GetAttib
(
int
n
)
{
return
attributes
[
n
];}
XMLAttrib
&
GetAtt
r
ib
(
int
n
)
{
return
attributes
[
n
];}
///Retrive number of attributes.
int
NumAttrib
()
const
{
return
(
int
)
attributes
.
size
();}
///Retrive the name of the tag.
...
...
@@ -205,10 +205,24 @@ namespace INMOST
int
FindAttrib
(
std
::
string
name
,
int
offset
=
-
1
)
const
;
///Retrive a child of current XML tag with number n.
const
XMLTree
&
GetChild
(
int
n
)
const
{
return
children
[
n
];}
///Retrive a child of current XML tag with name
const
XMLTree
&
GetChild
(
std
::
string
name
)
const
{
int
n
=
FindChild
(
name
);
assert
(
n
!=
NumChildren
());
return
children
[
n
];
}
///Retrive number of children.
int
NumChildren
()
const
{
return
(
int
)
children
.
size
();}
///Retrive attribute of current XML tag with number n.
const
XMLAttrib
&
GetAttrib
(
int
n
)
const
{
return
tag
.
GetAttib
(
n
);}
///Retrive attribute of current XML tag with name.
const
std
::
string
&
GetAttrib
(
std
::
string
name
)
const
{
int
n
=
FindAttrib
(
name
);
assert
(
n
!=
NumAttrib
());
return
GetAttrib
(
n
).
value
;
}
///Retrive number of attributes.
int
NumAttrib
()
const
{
return
tag
.
NumAttrib
();}
///Retrive the name of the tag.
...
...
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