mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 19:25:53 +02:00
XML: complete merge from 1.4.2
This commit is contained in:
@@ -212,22 +212,22 @@ inline int AttributesImpl::getLength() const
|
||||
|
||||
inline const XMLString& AttributesImpl::getLocalName(int i) const
|
||||
{
|
||||
poco_assert (i < _attributes.size());
|
||||
return _attributes[i].localName;
|
||||
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||
return _attributes[i].localName;
|
||||
}
|
||||
|
||||
|
||||
inline const XMLString& AttributesImpl::getQName(int i) const
|
||||
{
|
||||
poco_assert (i < _attributes.size());
|
||||
return _attributes[i].qname;
|
||||
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||
return _attributes[i].qname;
|
||||
}
|
||||
|
||||
|
||||
inline const XMLString& AttributesImpl::getType(int i) const
|
||||
{
|
||||
poco_assert (i < _attributes.size());
|
||||
return _attributes[i].type;
|
||||
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||
return _attributes[i].type;
|
||||
}
|
||||
|
||||
|
||||
@@ -253,8 +253,8 @@ inline const XMLString& AttributesImpl::getType(const XMLString& namespaceURI, c
|
||||
|
||||
inline const XMLString& AttributesImpl::getValue(int i) const
|
||||
{
|
||||
poco_assert (i < _attributes.size());
|
||||
return _attributes[i].value;
|
||||
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||
return _attributes[i].value;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,15 +280,15 @@ inline const XMLString& AttributesImpl::getValue(const XMLString& namespaceURI,
|
||||
|
||||
inline const XMLString& AttributesImpl::getURI(int i) const
|
||||
{
|
||||
poco_assert (i < _attributes.size());
|
||||
return _attributes[i].namespaceURI;
|
||||
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||
return _attributes[i].namespaceURI;
|
||||
}
|
||||
|
||||
|
||||
inline bool AttributesImpl::isSpecified(int i) const
|
||||
{
|
||||
poco_assert (i < _attributes.size());
|
||||
return _attributes[i].specified;
|
||||
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||
return _attributes[i].specified;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -92,13 +92,13 @@ public:
|
||||
/// Remove the given namespace prefix.
|
||||
|
||||
void getDeclaredPrefixes(PrefixSet& prefixes) const;
|
||||
/// Return an enumeration of all prefixes declared in this context.
|
||||
///
|
||||
/// The empty (default) prefix will be included in this enumeration; note that
|
||||
/// this behaviour differs from that of getPrefix(java.lang.String) and getPrefixes().
|
||||
/// Return an enumeration of all prefixes declared in this context.
|
||||
///
|
||||
/// The empty (default) prefix will be included in this enumeration; note that
|
||||
/// this behaviour differs from that of getPrefix() and getPrefixes().
|
||||
|
||||
const XMLString& getPrefix(const XMLString& namespaceURI) const;
|
||||
/// Return one of the prefixes mapped to a Namespace URI.
|
||||
const XMLString& getPrefix(const XMLString& namespaceURI) const;
|
||||
/// Return one of the prefixes mapped to a Namespace URI.
|
||||
///
|
||||
/// If more than one prefix is currently mapped to the same URI, this method
|
||||
/// will make an arbitrary selection; if you want all of the prefixes, use the
|
||||
@@ -179,14 +179,14 @@ public:
|
||||
/// prefixes currently declared. The result will be returned in
|
||||
/// namespaceURI and localName.
|
||||
/// If the raw name has a prefix that has not been declared, then the return
|
||||
/// value will be false, otherwise true.
|
||||
///
|
||||
/// Note that attribute names are processed differently than element names:
|
||||
/// an unprefixed element name will received the
|
||||
/// default Namespace (if any), while an unprefixed element name will not.
|
||||
/// value will be false, otherwise true.
|
||||
///
|
||||
/// Note that attribute names are processed differently than element names:
|
||||
/// an unprefixed element name will receive the
|
||||
/// default Namespace (if any), while an unprefixed attribute name will not.
|
||||
|
||||
void reset();
|
||||
/// Reset this Namespace support object for reuse.
|
||||
void reset();
|
||||
/// Reset this Namespace support object for reuse.
|
||||
///
|
||||
/// It is necessary to invoke this method before reusing the Namespace support
|
||||
/// object for a new session. If namespace declaration URIs are to be supported,
|
||||
|
@@ -56,12 +56,16 @@ class XML_API SAXParser: public XMLReader
|
||||
/// * http://xml.org/sax/features/external-general-entities
|
||||
/// * http://xml.org/sax/features/external-parameter-entities
|
||||
/// * http://xml.org/sax/features/namespaces
|
||||
/// * http://xml.org/sax/features/namespace-prefixes
|
||||
/// * http://xml.org/sax/properties/lexical-handler
|
||||
/// * http://xml.org/sax/properties/declaration-handler
|
||||
/// * http://xml.org/sax/features/namespace-prefixes
|
||||
/// * http://xml.org/sax/properties/lexical-handler
|
||||
/// * http://xml.org/sax/properties/declaration-handler
|
||||
///
|
||||
/// The following proprietary extensions are supported:
|
||||
/// * http://www.appinf.com/features/enable-partial-reads --
|
||||
/// see ParserEngine::setEnablePartialReads()
|
||||
{
|
||||
public:
|
||||
SAXParser();
|
||||
SAXParser();
|
||||
/// Creates an SAXParser.
|
||||
|
||||
SAXParser(const XMLString& encoding);
|
||||
@@ -100,11 +104,13 @@ public:
|
||||
void parse(const XMLString& systemId);
|
||||
void parseMemoryNP(const char* xml, std::size_t size);
|
||||
|
||||
/// Extensions
|
||||
void parseString(const std::string& xml);
|
||||
/// Extensions
|
||||
void parseString(const std::string& xml);
|
||||
|
||||
static const XMLString FEATURE_PARTIAL_READS;
|
||||
|
||||
protected:
|
||||
void setupParse();
|
||||
void setupParse();
|
||||
|
||||
private:
|
||||
ParserEngine _engine;
|
||||
|
Reference in New Issue
Block a user