Esempio n. 1
0
// ---------------------------------------------------------------------------
//  ContentSpecNode: Miscellaneous
// ---------------------------------------------------------------------------
void ContentSpecNode::formatSpec(XMLBuffer&      bufToFill) const
{
    // Clean out the buffer first
    bufToFill.reset();

    if (fType == ContentSpecNode::Leaf)
        bufToFill.append(chOpenParen);
    formatNode
    (
        this
        , UnknownType
        , bufToFill
    );
    if (fType == ContentSpecNode::Leaf)
        bufToFill.append(chCloseParen);
}
Esempio n. 2
0
void ReaderMgr::getSpaces(XMLBuffer& toFill)
{
    // Reset the buffer before we start
    toFill.reset();

    //
    //  Get all the spaces from the current reader. If it returns true,
    //  it hit a non-space and we are done. Else we have to pop a reader
    //  and keep going.
    //
    while (!fCurReader->getSpaces(toFill))
    {
        // We wore that one out, so lets pop a reader and try again
        if (!popReader())
            break;
    }
}
Esempio n. 3
0
void ReaderMgr::getUpToCharOrWS(XMLBuffer& toFill, const XMLCh toCheck)
{
    // Reset the target buffer before we start
    toFill.reset();

    //
    //  Ok, enter a loop where we ask the current reader to get chars until
    //  it meets the criteria. It returns false if it came back due to eating
    //  up all of its data. Else it returned because something matched, and
    //  we are done.
    //
    while (!fCurReader->getUpToCharOrWS(toFill, toCheck))
    {
        // We ate that one up, lets try to pop another. If not, break out
        if (!popReader())
            break;
    }
}