r 16, 2001 2:32 AM
To: [EMAIL PROTECTED]
Subject: Re: changing Attribute of Node
Sorry
I mean how to change attribute of any Node.
Shashank wrote:
> I posted a question few days ago, regarding how to changing Node
> Attribute.
>
> This API is available for an Element, but a
Sorry
I mean how to change attribute of any Node.
Shashank wrote:
> I posted a question few days ago, regarding how to changing Node
> Attribute.
>
> This API is available for an Element, but a Node is not an Element.
>
> So then how to change the Attribute of any Element.
>
> Does anyone has s
I posted a question few days ago, regarding how to changing Node
Attribute.
This API is available for an Element, but a Node is not an Element.
So then how to change the Attribute of any Element.
Does anyone has some simple example to change this.
take carre
Shashank
--
Why do you need to cast an attribute node to Element?. If you want to change
the
value of an attribute you can do it as:
Element element;
NamedNodeMap attributes = element.getAttributes();
Node attribute = attributes.getNamedItem("name of attribute to change");
attribute.setNodeValue("new v
TECTED]>
> g.nu> cc:
> Subject: changing attribute of
> Node
> 10/12/01
> 10:09 AM
> Please
> respond to
> xerces-j
Casting org.w3c.Node(s) to Element is giving ClassCastException
If I try printing Class of this Node (which I try casting to type Element) it
prints
class Type is org.apache.xerces.dom.DeferredAttrNSImpl
java.lang.ClassCastException: org.apache.xerces.dom.DeferredAttrNSImpl
Subject: changing attribute of
Node
10/12/01
The attributes of an element node are again org.w3c.Node(s). So, you can use
the
same set of APIs to modify the attribute as for elements.
:-)
Cheers,
Rahul.
> From: Shashank <[EMAIL PROTECTED]>
>
> Hi !
>
> I am using xerces parser for parsing XML file and reading and changing
> Node value.
Hi !
I am using xerces parser for parsing XML file and reading and changing
Node value.
but how to change the attribute of this Node. I didn't find correct
API.
I can read the value of Node's attribute, but then how to change this
value.
take care,
Shashank
--
---