コード例 #1
0
/*
 * @return @c true if this XMLToken is an XML end element for the given XML
 * start element, false otherwise.
 */
bool
XMLToken::isEndFor (const XMLToken& element) const
{
  return
    isEnd()                        &&
    !isStart()                     &&
    element.isStart()              &&
    element.getName() == getName() &&
    element.getURI () == getURI ();
}
コード例 #2
0
/*
 * Copy constructor; creates a copy of this XMLToken.
 */
XMLToken::XMLToken(const XMLToken& orig)
 : mTriple()
 , mAttributes()
 , mNamespaces()
 , mChars (orig.mChars)
 , mIsStart (orig.mIsStart)
 , mIsEnd (orig.mIsEnd)
 , mIsText (orig.mIsText)
 , mLine (orig.mLine)
 , mColumn (orig.mColumn)
{
  if (!orig.mTriple.isEmpty())
    mTriple = XMLTriple(orig.getName(), orig.getURI(), orig.getPrefix());
  
  if (!orig.mAttributes.isEmpty())
    mAttributes = XMLAttributes(orig.getAttributes());
  
  if (!orig.mNamespaces.isEmpty())
    mNamespaces = XMLNamespaces(orig.getNamespaces());

}