Setting attributes in XML
1 posts in topic
Flat View  Flat View

Posted By:   Elodie_TASIA
Posted On:   Monday, August 6, 2001 11:52 PM

Hi ! I've got trouble with this two methods :

setAttribute(name, value) and setAttributeNode(Attr)

that you can find in org.w3c.dom.Element and org.apache.xerces.dom.ElementImpl.

For the first one, the method doesn't like parameters that are not written like this :

myElement.setAttribute("myName", "jane")

But I need to do that :

			String value = "jane";
myElement.setAttribute("myName", value)

And the second method never works !

Please help !

Re: Setting attributes in XML

Posted By:   Anonymous  
Posted On:   Tuesday, August 7, 2001 12:39 AM

It doesn't really make sense. Are you 100% sure that the problem is on that statement and not somewhere else (maybe a NullPointerException)?

can you post the code?

About | Sitemap | Contact