[gnote] Add is_empty_element method to XmlReader
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Add is_empty_element method to XmlReader
- Date: Sat, 5 Nov 2016 19:34:36 +0000 (UTC)
commit b9ad35170988d10f465099937b070446eaa939c1
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Nov 5 21:30:17 2016 +0200
Add is_empty_element method to XmlReader
src/sharp/xmlreader.cpp | 7 ++++++-
src/sharp/xmlreader.hpp | 2 ++
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/sharp/xmlreader.cpp b/src/sharp/xmlreader.cpp
index bcbfdff..e8ca549 100644
--- a/src/sharp/xmlreader.cpp
+++ b/src/sharp/xmlreader.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2016 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -113,6 +113,11 @@ namespace sharp {
return (xmlReaderTypes)type;
}
+ bool XmlReader::is_empty_element()
+ {
+ return xmlTextReaderIsEmptyElement(m_reader) == 1;
+ }
+
std::string XmlReader::get_name()
{
return xmlchar_to_string(xmlTextReaderConstName(m_reader));
diff --git a/src/sharp/xmlreader.hpp b/src/sharp/xmlreader.hpp
index ada71a3..6dc55c0 100644
--- a/src/sharp/xmlreader.hpp
+++ b/src/sharp/xmlreader.hpp
@@ -1,6 +1,7 @@
/*
* gnote
*
+ * Copyright (C) 2016 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -59,6 +60,7 @@ public:
xmlReaderTypes get_node_type();
std::string get_name();
+ bool is_empty_element();
std::string get_attribute(const char *);
std::string get_value();
std::string read_string();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]