empty/non-empty element

J

John

Hi,

I have an element StaticLayerDataStream referenced in the schema file.
This element can be empty or non-empty in the instance file depending
on circumstances.

<xs:element name="StaticLayerDataStream" type="xs:hexBinary">

Now in the XML instance file, the parser throws an error when it comes
across an empty StaticLayerDataStream element like so:

<StaticLayerDataStream> </StaticLayerDataStream>

I have even tried this

<StaticLayerDataStream/>

but it does not work. Any ideas on how to let the schema identify the
element as being empty sometimes AND non-empty sometimes?

Thanks
John
 
K

Klaus Johannes Rusch

John said:
I have an element StaticLayerDataStream referenced in the schema file.
This element can be empty or non-empty in the instance file depending
on circumstances.

<xs:element name="StaticLayerDataStream" type="xs:hexBinary">

I have even tried this

<StaticLayerDataStream/>

but it does not work. Any ideas on how to let the schema identify the
element as being empty sometimes AND non-empty sometimes?

What is the error message you get from the parser?
<StaticLayerDataStream/> looks prefectly valid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top