Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > empty/non-empty element

Reply
Thread Tools

empty/non-empty element

 
 
John
Guest
Posts: n/a
 
      07-15-2003
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
 
Reply With Quote
 
 
 
 
Klaus Johannes Rusch
Guest
Posts: n/a
 
      07-16-2003
John wrote:

> 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.

--
Klaus Johannes Rusch

http://www.atmedia.net/KlausRusch/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to Update/insert an xml element's text----> (<element>text</element>) HANM XML 2 01-29-2008 03:31 PM
The element 'compilation' has invalid child element 'compilers'. =?Utf-8?B?Um9iZXJ0?= ASP .Net 3 11-15-2005 01:48 AM
java.lang.NoSuchMethodError: org.jdom.Element: method getParent()Lorg/jdom/Element Tinker Java 4 10-09-2005 03:12 PM
moving from form element to form element Rod Snyder ASP .Net 1 05-29-2004 01:55 PM
per the active schema, the element <BR> must be included within a parent element MSNews ASP .Net 1 04-22-2004 04:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57