Waitrud Weber’s blog

things and reminders for memories

CodeAnalyzer: html: The way you are is still fine.

Memories tree is not only for the xml format but for the html and it has tags like a table, which is for the easiness of reading documents.

 

1 - - -
2 .\main.cpp  Thu Apr 14 16:06:05 2022
...
172 :
173 ://int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) ;
174 ://
175 :int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) {
176 :    int index;
177 :    char* p_dummy;
178 :    int result;
179 :    char k_buffer[255];
180 :    printf("int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) starts.\r\n");
181 :
182 :    for(int i=0; i<max_buffer; i++ ) {
183 :        sfp->index++;
184 :        p_dummy = get_string( *sfp , 5);
185 :        if ( m_start_with ( (char*)p_dummy, "<" ) == 1 ) {
186 :            key_buffer[i] ='\0';
187 :            printf("We found the |<| index %d fp|%d|.\r\n", sfp->index, sfp->fp );
188 :            printf("key_buffer |%s| is becoming the between possible.\r\n", key_buffer );
189 :
190 :            // Keep buffer because key_buffer is going next to be changed.
191 :
192 :            result = get_inside( k_buffer, 255, ">", sfp );
193 :            printf("k_buffer |%s| is becoming the end tag inside possible.\r\n", k_buffer );
194 :            printf("key_buffer |%s| is still becoming the between possible.\r\n", key_buffer );
195 :
196 :            printf("int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) returns 1.\r\n");
197 :            return 1;
198 :        }
199 :        key_buffer[i] = p_dummy[0];
200 :    }
201 :
202 :    printf("int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) ends.\r\n");
203 :    return 0;
204 :}
205 :
   
3
tag=|p|
int analyze_html_inside( char* inside, HTMLTAG* html ) ends.
Next is going to be the between <p> and </p>
int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) starts.
We found the |<| index 25 fp|1972345960|.
key_buffer |&gt; .\winmain_001.exe| is becoming the between possible.
int get_inside( char* key_buffer, int max_buffer, char* end_string, STRUCT_FILE* sfp ) starts.
We found the |>| index 30 fp|1972345960|.
key_buffer |br /|
int get_inside( char* key_buffer, int max_buffer, char* end_string, STRUCT_FILE* sfp ) returns 1.
k_buffer |br /| is becoming the end tag inside possible.
key_buffer |&gt; .\winmain_001.exe| is still becoming the between possible.
int get_between( char* key_buffer, int max_buffer, HTMLTAG* html, STRUCT_FILE* sfp ) returns 1.
html|009C1180|

   
4      
5      
6      

*