[sword-cvs] sword/src/utilfuns utilxml.cpp,1.4,1.5

sword@www.crosswire.org sword@www.crosswire.org
Wed, 18 Jun 2003 13:15:02 -0700


Update of /usr/local/cvsroot/sword/src/utilfuns
In directory www:/tmp/cvs-serv27120/src/utilfuns

Modified Files:
	utilxml.cpp 
Log Message:
	Joachim added OSISFootnotes.  Added entryAttributes
		parsing in OSISFootnotes
	Added = operator and empty constructor to XMLTag
	Fixed OSISHeadings to passthru non x-preverse note
		bodies



Index: utilxml.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/utilfuns/utilxml.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** utilxml.cpp	28 May 2003 17:25:45 -0000	1.4
--- utilxml.cpp	18 Jun 2003 20:15:00 -0000	1.5
***************
*** 54,61 ****
--- 54,73 ----
  	name   = 0;
  	buf    = 0;
+ 	setText(tagString);
+ }
+ 
+ void XMLTag::setText(const char *tagString) {
  	parsed = false;
  	empty  = false;
  	endTag = false;
  
+ 	if (buf) {
+ 		delete buf;
+ 		buf = 0;
+ 	}
+ 
+ 	if (!tagString)		// assert tagString before proceeding
+ 		return;
+ 
  	stdstr(&buf, tagString);
  
***************
*** 69,72 ****
--- 81,86 ----
  	for (; ((tagString[i]) && (!strchr(" />", tagString[i]))); i++);
  	if (i-start) {
+ 		if (name)
+ 			delete [] name;
  		name = new char [ (i-start) + 1 ];
  		strncpy(name, tagString+start, i-start);