destroy = del;
}
-XMLBuffer::XMLBuffer(long buf_size, const char *buf, int del)
+XMLBuffer::XMLBuffer(long buf_size, char *buf, int del)
{ // writing
bfr = (unsigned char *)buf;
bsz = buf_size;
return 1;
}
-int FileXML::read_data_until(const char *tag_end, char *out, int len)
+int FileXML::read_data_until(const char *tag_end, char *out, int len, int skip)
{
long ipos = buffer->itell();
int opos = 0, pos = -1;
++pos;
}
// if end tag is reached, pos is left on the < of the end tag
- if( pos >= 0 && !tag_end[pos] )
+ if( !skip && pos >= 0 && !tag_end[pos] )
buffer->iseek(ipos);
return opos;
}
-int FileXML::read_text_until(const char *tag_end, char *out, int len)
+int FileXML::read_text_until(const char *tag_end, char *out, int len, int skip)
{
char data[len+1];
- int opos = read_data_until(tag_end, data, len);
+ int opos = read_data_until(tag_end, data, len, skip);
decode(out, data, opos);
return 0;
}