MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ attribute()

std::optional< std::string_view > MayaFlux::IO::XmlElementView::attribute ( std::string_view name) const
nodiscardnoexcept

Definition at line 30 of file XmlReader.cpp.

31{
32 const size_t end = m_row + m_forest->subtree_size(m_row);
33 for (size_t index = m_row + 1; index < end; ++index) {
34 const auto source = m_rows->at(index);
35 if (!source || source->text("kind") != std::string_view("attribute"))
36 break;
37 if (source->text("name") == name)
38 return source->text("value");
39 }
40 return std::nullopt;
41}
const Kakshya::CompositeArray * m_rows
Definition XmlReader.hpp:55
std::string_view name() const noexcept
Definition XmlReader.cpp:24
const Kakshya::ForestIndex * m_forest
Definition XmlReader.hpp:56
Source source()
Begin a Source chain.
Definition Plot.hpp:127

References m_forest, m_row, m_rows, and name().

Referenced by MayaFlux::IO::XmlRecordAccess< XmlElementView >::attribute().

Here is the call graph for this function:
Here is the caller graph for this function: