12#include <Poco/AutoPtr.h>
13#include <Poco/DOM/Element.h>
14#include <Poco/DOM/Node.h>
15#include <Poco/DOM/NodeList.h>
16#include <Poco/XML/XMLString.h>
82 const std::string &attributeName) {
83 Poco::AutoPtr<Poco::XML::NodeList> elementTag = element->getElementsByTagName(tagName);
86 if (elementTag->length() == 1) {
87 auto *item =
dynamic_cast<Poco::XML::Element *
>(elementTag->item(0));
90 if (!item->getAttribute(attributeName).empty()) {
91 return (item->getAttribute(attributeName));
A class that holds information about catalogs.
const std::string windowsPrefix() const override
Obtain Windows prefix from the facility file.
std::string getAttribute(const Poco::XML::Element *element, const std::string &tagName, const std::string &attributeName)
Obtain the attribute from a given element tag and attribute name.
const std::string linuxPrefix() const override
Obtain Linux prefix from facility file.
CatalogInfo * clone() const override
Clone.
std::string m_catalogName
std::string m_externalDownloadURL
const std::string macPrefix() const override
Obtain Macintosh prefix from facility file.
const std::string soapEndPoint() const override
Obtain soap end point from the facility file.
const std::string catalogName() const override
Obtain catalog name from the facility file.
std::string m_linuxPrefix
CatalogInfo(const Poco::XML::Element *element)
Constructor.
std::string m_soapEndPoint
std::string m_catalogPrefix
const std::string catalogPrefix() const override
Obtain the regex prefix from the facility file.
const std::string externalDownloadURL() const override
Obtain the external download URL.
std::string m_windowsPrefix