netcdf-c/ncdump/ref1.ncml
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
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="&lt;, &gt;, ', &quot;, and &amp;" />
<attribute name="gnatt" type="int" value="3 4" />
<attribute name="gdatt" type="double" value="-7.02788826649782e-09 7.02788826649782e-09" />
<attribute name="gnul" value="&#0;abcd&#0;&#0;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>