Re: Regarding setNamedItem!!!

Any level 2 parser should call level 2 methods, hence it should call 
setNamedItemNS in preference to setNamedItem.  Otherwise, it would not 
properly detect namespace non-well-formedness problems that come from a 
document that cannot be represented in terms of level 2 DOM, i.e. where 
two attributes have the same prefix which map to the same namespaceURI, 
which can be detected by testing for a non-null return from setNamedItemNS.

Ray Whitmer
rayw@netscape.com

Thara S wrote:

>  
>
> Hi!!!,
>
>  
>
> Could someone help me out on this tooooo!!!
>
>  
>
> When I have both DOM Level 1 and level 2 methods implemented, to 
> implement a parse function which parses an input XML file,what kind of 
> checking  should
>  I make to choose an appropriate method from level 1 or level 2 (the 
> one with namespaces). For example, in the input XML FILE, when I 
> encounter an attribute node of an element, how do I know whether 
> setNamedItem or setNamedItemNS should be called?
>
>  
>
> thanx in advance,
>
>  
>
> regards
>
> Thara
>

Received on Tuesday, 16 October 2001 11:59:25 UTC