Ejemplo n.º 1
0
bool ofxTextBlock::isMetaTagStart( string & str_ ){

    if(isMetaTag( str_, "<i>"))
       return true;

    if(isMetaTag( str_, "<b>"))
       return true;

    return false;

};
Ejemplo n.º 2
0
bool ofxTextBlock::isMetaTagEnd( string & str_ ){


    if(isMetaTag( str_, "</i>"))
       return true;

    return false;

};
Ejemplo n.º 3
0
void HTMLParser	::	headTag( TElementShared aParent )	{

	cout << "head tag found\n";
	
	// Add to parent
	TElementShared element = mDocument->createElement( "head" );
	aParent->appendChild( element );
	
	bool insideHead = true;
	
	while ( insideHead )	{
		getTag();

		if ( isStartTag() )	{
			if ( isTitleTag() ||
				 isStyleTag() ||
				 isScriptTag() )	{
				normalHeadTag( element );
				continue;
			}
			if ( isIsIndexTag() ||
				 isBaseTag() ||
				 isMetaTag() ||
				 isLinkTag() )	{
				emptyElementTag( element );
				continue;
			}
			if ( isCommentTag() )	{
				commentTag( element );
				continue;
			}
			
			// Not a known tag
			cout << "headTag: Unexpected tag found: " << mTag << ". Skipping...\n";
			skipTag();

		}
		else	{			
			if ( isHeadTag() )	{
				cout << "head closing tag found\n";

				// End the while loop
				insideHead = false;
			}
			else	{
				cout << "headTag: Unexpected closing tag found: " << mTag << ". Skipping...\n";
			}
		}
	}
	
}