#include "FWCore/Services/src/SiteLocalConfigService.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <xercesc/dom/DOM.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLString.hpp>
#include <sstream>
Go to the source code of this file.
Functions | |
XMLCh * | _toDOMS (std::string temp) |
std::string | _toParenString (const DOMNode &nodeToConvert) |
std::string | _toString (const XMLCh *toTranscode) |
XMLCh* _toDOMS | ( | std::string | temp | ) | [inline] |
Definition at line 30 of file SiteLocalConfigService.cc.
References transcode().
00031 { 00032 XMLCh* buff = XMLString::transcode(temp.c_str()); 00033 return buff; 00034 }
std::string _toParenString | ( | const DOMNode & | nodeToConvert | ) | [inline] |
Definition at line 38 of file SiteLocalConfigService.cc.
References _toString(), asciidump::attributes, i, and j.
Referenced by edm::service::SiteLocalConfigService::parse().
00039 { 00040 std::ostringstream oss; 00041 00042 DOMNodeList *childList = nodeToConvert.getChildNodes(); 00043 00044 unsigned int numNodes = childList->getLength (); 00045 for (unsigned int i = 0; i < numNodes; ++i) 00046 { 00047 DOMNode *childNode = childList->item(i); 00048 if (childNode->getNodeType() != DOMNode::ELEMENT_NODE) 00049 continue; 00050 DOMElement *child = static_cast <DOMElement *> (childNode); 00051 00052 DOMNamedNodeMap *attributes = child->getAttributes(); 00053 unsigned int numAttributes = attributes->getLength (); 00054 for (unsigned int j = 0; j < numAttributes; ++j) 00055 { 00056 DOMNode *attributeNode = attributes->item(j); 00057 if (attributeNode->getNodeType() != DOMNode::ATTRIBUTE_NODE) 00058 continue; 00059 DOMAttr *attribute = static_cast <DOMAttr *> (attributeNode); 00060 00061 oss << "(" << _toString(child->getTagName()) << 00062 _toString(attribute->getName()) << "=" << 00063 _toString(attribute->getValue()) << ")"; 00064 } 00065 } 00066 return oss.str(); 00067 }
std::string _toString | ( | const XMLCh * | toTranscode | ) | [inline] |
Definition at line 24 of file SiteLocalConfigService.cc.
References tmp, and transcode().
00025 { 00026 std::string tmp(XMLString::transcode(toTranscode)); 00027 return tmp; 00028 }