| 221 |
|
for (i = 0; i < nfield_assign; i++) { |
| 222 |
|
const char *fnext = field_assignment[i]; |
| 223 |
|
for ( ; ; ) { |
| 224 |
+ |
int added = 0; |
| 225 |
|
ezxml_t fld; |
| 226 |
|
char sbuf[512]; |
| 227 |
|
int j; |
| 254 |
|
fprintf(stderr, |
| 255 |
|
"%s: warning - adding tag <%s>\n", |
| 256 |
|
fn, sbuf); |
| 257 |
+ |
ezxml_add_txt(wtl, "\t"); |
| 258 |
|
fld = ezxml_add_child_d(wtl, sbuf, strlen(wtl->txt)); |
| 259 |
+ |
++added; |
| 260 |
|
} |
| 261 |
|
if (XMLfieldID[j].has_unit) |
| 262 |
|
ezxml_set_attr(fld, "unit", attr_unit); |
| 280 |
|
} |
| 281 |
|
sbuf[j] = '\0'; |
| 282 |
|
ezxml_set_txt_d(fld, sbuf); |
| 283 |
+ |
if (added) |
| 284 |
+ |
ezxml_add_txt(wtl, "\n\t"); |
| 285 |
|
fnext += (*fnext == FASEP); |
| 286 |
|
} |
| 287 |
|
} |
| 598 |
|
ezxml_t ab, dd = ezxml_child(wtl, "DataDefinition"); |
| 599 |
|
if (dd != NULL) { |
| 600 |
|
offset = dd->off; |
| 601 |
< |
fprintf(stderr, |
| 601 |
> |
if (dd->child != NULL) |
| 602 |
> |
fprintf(stderr, |
| 603 |
|
"%s: warning - replacing existing <DataDefinition> in '%s'\n", |
| 604 |
|
caller, xml_path); |
| 605 |
|
ezxml_remove(dd); |