[xml] Properties (attributes) with no value.
- From: "Adam Jerome" <AJEROME novell com>
- To: <xml gnome org>
- Subject: [xml] Properties (attributes) with no value.
- Date: Fri, 01 Oct 2004 11:21:41 -0600
xmlGurus,
I am a very pleased "new user" of libxml.
To all those who have been involved with the development of this
library: "Well Done!"
A question....
Do XML standards require (and/or does libxml require) that properties
(ie :attributes) always have an associated value?
Considering the following example:
<ELEMENT attribute="true">
Would the following be within XML standards:?
<ELEMENT attribute>
Such might be useful as a (shorthand) boolean flag using xmlHasProp().
If the attribute exists, then [attribute="true"] can be assumed;
otherwise, [attribute="false"] can be assumed.
If this methodology is sound, I would like to implement such
methodology in my application. I have attempted to do so with:
xmlSetProp(..., "attribute", NULL);
However, this resulted in:
<ELEMENT attribute="">
... when I was hoping to generate:
<ELEMENT attribute>
Is there a way to do this, or is my methodology "out in the weeds"?
-adam
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]