Lines Matching full:mt
101 struct mytree *mt; in StartElement() local
105 mt = userData; in StartElement()
107 mt->ignore = 1; in StartElement()
110 mt->ignore = 0; in StartElement()
111 mt->indent += 2; in StartElement()
122 np->parent = mt->cur; in StartElement()
123 LIST_INSERT_HEAD(&mt->cur->children, np, siblings); in StartElement()
124 mt->cur = np; in StartElement()
130 struct mytree *mt; in EndElement() local
133 mt = userData; in EndElement()
134 if (mt->ignore) in EndElement()
137 mt->indent -= 2; in EndElement()
138 sbuf_finish(mt->cur->cont); in EndElement()
139 LIST_FOREACH(np, &mt->cur->children, siblings) { in EndElement()
142 sbuf_cat(mt->cur->key, sbuf_data(np->cont)); in EndElement()
145 sbuf_finish(mt->cur->key); in EndElement()
146 mt->cur = mt->cur->parent; in EndElement()
152 struct mytree *mt; in CharData() local
155 mt = userData; in CharData()
156 if (mt->ignore) in CharData()
165 sbuf_bcat(mt->cur->cont, b, e - b + 1); in CharData()
172 struct mytree *mt; in dofile() local
179 mt = calloc(1, sizeof *mt); in dofile()
180 mt->top = new_node(); in dofile()
181 mt->top->name = "(top)"; in dofile()
182 mt->top->parent = mt->top; in dofile()
183 mt->cur = mt->top; in dofile()
184 sbuf_finish(mt->top->key); in dofile()
185 sbuf_finish(mt->top->cont); in dofile()
186 XML_SetUserData(parser, mt); in dofile()
200 sbuf_finish(mt->top->cont); in dofile()
202 return (mt); in dofile()