mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-09 08:11:38 +08:00
5a1ca24fd6
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.
15 lines
375 B
Plaintext
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" ;
|
|
}
|