mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
GH #463: XML does not compile with XML_UNICODE_WCHAR_T
This commit is contained in:
parent
7c6e402d0e
commit
ba0d9830eb
@ -264,7 +264,7 @@ public:
|
||||
/// Creates and returns a unique namespace prefix that
|
||||
/// can be used with startPrefixMapping().
|
||||
|
||||
bool isNamespaceMapped(const std::string& namespc) const;
|
||||
bool isNamespaceMapped(const XMLString& namespc) const;
|
||||
/// Returns true if the given namespace has been mapped
|
||||
/// to a prefix in the current element or its ancestors.
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "Poco/DOM/ElementsByTagNameList.h"
|
||||
#include "Poco/DOM/AutoPtr.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/UnicodeConverter.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -417,7 +418,13 @@ const Node* AbstractContainerNode::findNode(XMLString::const_iterator& it, const
|
||||
XMLString index;
|
||||
while (it != end && *it != ']') index += *it++;
|
||||
if (it != end) ++it;
|
||||
#ifdef XML_UNICODE_WCHAR_T
|
||||
std::string idx;
|
||||
Poco::UnicodeConverter::convert(index, idx);
|
||||
return findNode(it, end, findElement(Poco::NumberParser::parse(idx), pNode, pNSMap), pNSMap);
|
||||
#else
|
||||
return findNode(it, end, findElement(Poco::NumberParser::parse(index), pNode, pNSMap), pNSMap);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -872,7 +872,7 @@ XMLString XMLWriter::uniquePrefix()
|
||||
}
|
||||
|
||||
|
||||
bool XMLWriter::isNamespaceMapped(const std::string& namespc) const
|
||||
bool XMLWriter::isNamespaceMapped(const XMLString& namespc) const
|
||||
{
|
||||
return _namespaces.isMapped(namespc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user