how can distinguish between XML Node and HTML Node, using attributes or
method ..
In the XML DOM nodes do not have an id property or a className property
while in the HTML DOM nodes do have those properties.
On the other hand there are specializations of the XML DOM like the SVG
DOM where id or className are properties too. Thus if you parse XML with
namespaces with browsers like Mozilla or Opera the parser recognizes
namespaces like the XHTML 1 namespace or the SVG namespace and you get
XHTML elements or SVG elements having id and className properties.
well,
I am try to overwrite the setAttribute, getAttribute properties for only HTML
Nodes(only Element Nodes) and not for the XML Nodes. since the two properties
are defined for both XML,HTML Nodes, I just want to handle those for HTML
Node and return the default case for Non HTML Nodes.
thanks,
Martin Honnen wrote:
>how can distinguish between XML Node and HTML Node, using attributes or
>method ..
>
>In the XML DOM nodes do not have an id property or a className property
>while in the HTML DOM nodes do have those properties.
>On the other hand there are specializations of the XML DOM like the SVG
>DOM where id or className are properties too. Thus if you parse XML with
namespaces with browsers like Mozilla or Opera the parser recognizes
>namespaces like the XHTML 1 namespace or the SVG namespace and you get
>XHTML elements or SVG elements having id and className properties.
>
>What exactly is it that you want to achieve?
>
Comment