You are correct on what a well formatted element looks like. However, the other 
'element' you are referring to is known as the declaration. W3C spec says it is 
required but you can get away using the DOM without it. Keep in mind encoding and 
other possible attribute values not set may produce unexpected results.

IMHO...include it always!


On Wed, 01 May 2002, Tomas Restrepo wrote:

>
> Hi Franklin,
>
> <<
> I thought a well formatted node has a />
>
> such as
>
> <NodeName attributes=stuff />
>
> or
> <NodeName>a bunch of stuff here</NodeName>
>
> this doesn't have that.
> <?xml version="1.0" encoding="utf-16"?>
> >>
>
> Well, yes, it doesn't have it, because it's not an element. What you
> described above is an Element Node, not just a node. For example, in XML, an
> element's attribute is itself a node, just as the text inside an element's
> opening and closing tags are, and neither of them certainly have a />.
>
> Processing instructions, like the other two, are just some kinds of nodes,
> different from elements. (Heck, even comments <!-- --> in XML files are
> nodes!)
>
> --
> Tomas Restrepo
> [EMAIL PROTECTED]
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.


__________________________________________________________
Get your FREE personalized e-mail at http://www.canada.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to