netcdf-c/ncdump/tst_ncml.cdl
Dennis Heimbigner 5a1ca24fd6 Fix github issue: https://github.com/Unidata/netcdf-c/issues/236
If a char valued attribute contains embedded nul characters,
then illegal xml will be generated when using the -x (ncml) flag.

There is not good solution since we have a char value '\0' that
is legal in a netcdf-c char valued attribute, but is completely
illegal in ncml (i.e. xml).

So, implemented hack is to go ahead and generate '�' entities
and then complain that we are generating illegal ncml.
2016-03-17 22:05:46 -06:00

15 lines
375 B
Plaintext

netcdf tst_ncml {
dimensions:
m = 2;
t = unlimited;
variables:
float var (t, m);
var:tatt = "text attribute value" ;
var:natt = 1, 2;
var:datt = 7.02788826649782e-09, -7.02788826649782e-09 ;
:gtatt = "<, >, \', \", and &" ;
:gnatt = 3, 4;
:gdatt = -7.02788826649782e-09, 7.02788826649782e-09 ;
char :gnul = "\000abcd\000\000hello\000" ;
}