A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classxml_1_1attributes.html below:

NCBI C++ ToolKit: xml::attributes Class Reference

Search Toolkit Book for xml::attributes

The xml::attributes class is used to access all the attributes of one xml::node. More...

#include <misc/xmlwrapp/attributes.hpp>

The xml::attributes class is used to access all the attributes of one xml::node.

You can add, find and erase attributes by name, and for some member functions, use the provided iterator classes.

The iterator classes allow you to access one XML attribute. This is done using the xml::attributes::attr class interface.

Definition at line 78 of file attributes.hpp.

◆ size_type ◆ attributes() [1/4] xml::attributes::attributes ( void  ) ◆ attributes() [2/4] ◆ attributes() [3/4] xml::attributes::attributes ( attributes &&  other )

Moving constructor.

Parameters
other The other attributes.

Definition at line 124 of file attributes.cpp.

References NULL.

◆ ~attributes() xml::attributes::~attributes ( void  ) virtual ◆ attributes() [4/4] ◆ begin() [1/2] ◆ begin() [2/2] ◆ createUnsafeNamespace() xml::ns xml::attributes::createUnsafeNamespace ( void *  libxml2RawNamespace ) staticprivate ◆ empty() bool xml::attributes::empty ( void  ) const

Find out if there are any attributes in this xml::attributes object.

Returns
True if there are no attributes.
False if there is at least one attribute.
Author
Peter Jones

Definition at line 413 of file attributes.cpp.

◆ end() [1/2] ◆ end() [2/2] ◆ erase() [1/2]

Erase the attribute with the given name.

This will invalidate any iterators that are pointing to that attribute, as well as any pointers or references to that attribute.

This function does not throw any exceptions.

Parameters
name The name of the attribute to erase. The name may be qualified. If it is qualified then the namespace parameter must be NULL. nspace The namespace of the atrribute to erase:
Returns
The number of erased attributes.
Author
Peter Jones, Sergey Satskiy

Definition at line 336 of file attributes.cpp.

References column, count, xml::impl::find_prop(), xml::ns::get_uri(), xml::ns::is_safe(), xml::ns::is_void(), NULL, string, and xml::ns::unsafe_ns_.

◆ erase() [2/2] ◆ find() [1/2]

Find the attribute with the given name and namespace.

If the attribute is not found on the current node, the DTD will be searched for a default value. This is, of course, if there was a DTD parsed with the XML document. If the search comes to DTD and the namespace is provided then the only namespace prefix is taken into account.

Parameters
name The name of the attribute to find. The name could be given as a qualified name, e.g. 'prefix:attr_name'. If the name is qualified then the nspace argument must be NULL (otherwise an exception is generated) and the attribute search is namespace aware with an effective namespace identified by the given prefix. nspace The namespace of the atrribute to find:
Returns
An iterator that points to the attribute with the given name.
If the attribute was not found, find will return end().
See also
xml::attributes::iterator
xml::attributes::attr
Author
Peter Jones; Sergey Satskiy, NCBI

Definition at line 288 of file attributes.cpp.

References xml::impl::find_default_prop(), xml::impl::find_prop(), and NULL.

◆ find() [2/2]

Find the attribute with the given name and namespace.

If the attribute is not found on the current node, the DTD will be searched for a default value. This is, of course, if there was a DTD parsed with the XML document. If the search comes to DTD and the namespace is provided then the only namespace prefix is taken into account.

Parameters
name The name of the attribute to find. The name could be given as a qualified name, e.g. 'prefix:attr_name'. If the name is qualified then the nspace argument must be NULL (otherwise an exception is generated) and the attribute search is namespace aware with an effective namespace identified by the given prefix. nspace The namespace of the atrribute to find:
Returns
A const_iterator that points to the attribute with the given name.
If the attribute was not found, find will return end().
See also
xml::attributes::const_iterator
xml::attributes::attr
Author
Peter Jones; Sergey Satskiy, NCBI

Definition at line 301 of file attributes.cpp.

References xml::impl::find_default_prop(), xml::impl::find_prop(), and NULL.

◆ get_data() void * xml::attributes::get_data ( void  ) private

Definition at line 140 of file attributes.cpp.

◆ getUnsafeNamespacePointer() void * xml::attributes::getUnsafeNamespacePointer ( const xml::nsname_space ) staticprivate ◆ insert()

Add an attribute to the attributes list.

If there is another attribute with the same name, it will be replaced with this one.

Parameters
name The name of the attribute to add. The name could be qualified. If it is qualified then the namespace parameter must be NULL. value The value of the attribute to add. nspace The namespace of the atrribute to insert:
Exceptions
Throws exceptions in case of problems.
Author
Peter Jones, Sergey Satskiy

Definition at line 188 of file attributes.cpp.

References column, xml::ns::get_prefix(), xml::ns::get_uri(), xml::ns::is_safe(), xml::ns::is_void(), kInsertError, NULL, string, xml::ns::unsafe_ns_, and rapidjson::value.

Referenced by CTabDelimitedValidator::_ReportXML(), AddContact(), AddStructuredCommentToAttributes(), xml::node::convert_to_nset(), PrintBioseqXML(), CFormatGuessApp::Run(), s_AddSamplePair(), CGapStatsApplication::x_PrintHistogram(), CGapStatsApplication::x_PrintSeqsForGapLengths(), and CGapStatsApplication::x_PrintSummaryView().

◆ operator=() [1/2] ◆ operator=() [2/2] ◆ set_data() void xml::attributes::set_data ( void *  node ) private

Definition at line 152 of file attributes.cpp.

◆ size() ◆ sort() void xml::attributes::sort ( void  ) ◆ swap() ◆ impl::node_impl ◆ node ◆ pimpl_ pimpl* xml::attributes::pimpl_ private

The documentation for this class was generated from the following files:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4