U-Lama\Lee | 560bd47 | 2011-12-28 19:42:49 -0800 | [diff] [blame^] | 1 | #include "tinyxml2.h"
|
| 2 |
|
| 3 | #include <string.h>
|
| 4 | #include <stdlib.h>
|
| 5 | #include <stdio.h>
|
| 6 |
|
| 7 | using namespace tinyxml2;
|
| 8 |
|
| 9 | /*static*/ CharBuffer* CharBuffer::Construct( const char* in )
|
| 10 | {
|
| 11 | size_t len = strlen( in );
|
| 12 | size_t size = len + sizeof( CharBuffer );
|
| 13 | CharBuffer* cb = (CharBuffer*) malloc( size );
|
| 14 | cb->length = len;
|
| 15 | strcpy( cb->mem, in );
|
| 16 | return cb;
|
| 17 | }
|
| 18 |
|
| 19 |
|
| 20 | /*static*/ void CharBuffer::Free( CharBuffer* cb )
|
| 21 | {
|
| 22 | free( cb );
|
| 23 | }
|
| 24 |
|
| 25 |
|
| 26 | XMLDocument::XMLDocument() :
|
| 27 | charBuffer( 0 )
|
| 28 | {
|
| 29 | }
|
U-Lama\Lee | e13c3e6 | 2011-12-28 14:36:55 -0800 | [diff] [blame] | 30 |
|
| 31 |
|
| 32 | bool XMLDocument::Parse( const char* str )
|
| 33 | {
|
| 34 |
|
U-Lama\Lee | 560bd47 | 2011-12-28 19:42:49 -0800 | [diff] [blame^] | 35 | return true;
|
U-Lama\Lee | e13c3e6 | 2011-12-28 14:36:55 -0800 | [diff] [blame] | 36 | }
|