Begynderspørgsmål
Hej,Jeg forsøger at lave et XML dokument udfra nedenstående efter f.g retningslinjer:
-----------
1. The structure of the XML file shall be as given in Annex 3
.
2. The XML file shall consist of a top-level header: <?xml version="1.0"?>.
3. The dataset shall begin with an opening tag: <pub47dataset country="" version="03" namespace>,
where namespace consists of two parts, (a) and (b) below, separated by a space:
a. xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
b. xsi:noNamespaceSchemaLocation="http://www.bom.gov.au/jcomm/vos/pub47/pub47.xsd"
4. The dataset shall end with a closing tag: </pub47dataset>.
5. Each ship record in the dataset will comprise 97 metadata elements and section headers, and shall:
a. Begin with an opening tag: <pub47record nmsID=””>
b. End with a closing tag </pub47record>.
-------------
Mår jeg udskifter 'NAMESPACE' med pkt. a & b får jeg en fejlmeddelelse. Problemet opstår når jeg enten åbner .XML dokumentet med musen eller når jeg parser filen med docBuilderen i java.
Er der en som kan forklare mig hvad der går galt?
Efterflg. er xml dokumentet som jeg skal oprette/udfylde poster udfra ved hjælp af docBuilderen.
----------------------------
<?xml version="1.0"?>
<pub47dataset country="" version="03" prepared="" namespace="">
<pub47record nmsID="">
<name/>
<reg/>
<call/>
<IMOn/>
<vssl footnote=""/>
<digital_image>
<vsslP/>
</digital_image>
<dimensions>
<lenvsslD/>
<brdvsslD/>
<frbvsslD/>
<drfvsslD/>
<chtvsslD/>
<brdg/>
</dimensions>
<operations>
<rte Id="1" footnote=""/>
<rte Id="2" footnote=""/>
<rte Id="3" footnote=""/>
<rte Id="4" footnote=""/>
<rte Id="5" footnote=""/>
<rte Id="6" footnote=""/>
<rte Id="7" footnote=""/>
<rte Id="8" footnote=""/>
<rte Id="9" footnote=""/>
<rte Id="10" footnote=""/>
</operations>
<vos_service>
<vosR/>
<vosD/>
<vclmR/>
<vclmD/>
</vos_service>
<met_prgm>
<vsslM footnote=""/>
<atm footnote=""/>
<freq footnote=""/>
<prST/>
<logE/>
<wwH/>
<anmU footnote=""/>
<blc footnote=""/>
</met_prgm>
<instrumentation>
<automated Id="1">
<awsM/>
<awsP/>
<awsC/>
</automated>
<barometer Id="1">
<barm footnote=""/>
<bMS/>
<brmH/>
<brmL footnote=""/>
<brmU/>
<brmC/>
</barometer>
<barometer Id="2">
<barm footnote=""/>
<bMS/>
<brmH/>
<brmL footnote=""/>
<brmU/>
<brmC/>
</barometer>
<dry_bulb Id="1">
<thrm footnote=""/>
<thMS/>
<thmE footnote=""/>
<thmL footnote=""/>
<thmH/>
<tscale footnote=""/>
</dry_bulb>
<dry_bulb Id="2">
<thrm footnote=""/>
<thMS/>
<thmE footnote=""/>
<thmL footnote=""/>
<thmH/>
<tscale footnote=""/>
</dry_bulb>
<hygrometer Id="1">
<hygr footnote=""/>
<hygE footnote=""/>
</hygrometer>
<hygrometer Id="2">
<hygr footnote=""/>
<hygE footnote=""/>
</hygrometer>
<sea_temp Id="1">
<sstM footnote=""/>
<sstD/>
</sea_temp>
<sea_temp Id="2">
<sstM footnote=""/>
<sstD/>
</sea_temp>
<barograph Id="1">
<barg footnote=""/>
</barograph>
<barograph Id="2">
<barg footnote=""/>
</barograph>
<anemometer Id="1">
<anmT footnote=""/>
<anmM/>
<anmL footnote=""/>
<anDB/>
<anDC/>
<anSC/>
<anHL/>
<anHD/>
<anmC/>
</anemometer>
<anemometer Id="2">
<anmT footnote=""/>
<anmM/>
<anmL footnote=""/>
<anDB/>
<anDC/>
<anSC/>
<anHL/>
<anHD/>
<anmC/>
</anemometer>
<other>
<othI Id="1" footnote=""/>
<othI Id="2" footnote=""/>
<othI Id="3" footnote=""/>
<othI Id="4" footnote=""/>
<othI Id="5" footnote=""/>
<othI Id="6" footnote=""/>
</other>
</instrumentation>
<chgd/>
</pub47record>
</pub47dataset>