mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +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
779 B
XML
15 lines
779 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="tst_ncml.nc">
|
|
<dimension name="m" length="2" />
|
|
<dimension name="t" length="0" isUnlimited="true" />
|
|
<attribute name="gtatt" value="<, >, ', ", and &" />
|
|
<attribute name="gnatt" type="int" value="3 4" />
|
|
<attribute name="gdatt" type="double" value="-7.02788826649782e-09 7.02788826649782e-09" />
|
|
<attribute name="gnul" value="�abcd��hello" />
|
|
<variable name="var" shape="t m" type="float">
|
|
<attribute name="tatt" value="text attribute value" />
|
|
<attribute name="natt" type="int" value="1 2" />
|
|
<attribute name="datt" type="double" value="7.02788826649782e-09 -7.02788826649782e-09" />
|
|
</variable>
|
|
</netcdf>
|