File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
Java in General
Joined: Feb 19, 2003
Oct 28, 2003 10:11:00
I need xalan and read xml files with. Now I would like to edit a node. I select this node with
Node node = XPathAPI.selectSingleNode(doc, "/*/logo") ;
Then I set a value to this node
Then I check it
and it wrote : "myLogo.gif"
If I open my xml file, the (only) node "logo" hasn't got a value...
What is my problem? Why the
"myLogo.gif" isn't save?
Joined: Dec 11, 2001
Oct 29, 2003 04:21:00
You are nearly there. You have read the file into the DOM in memory. The change you have made is in memory. You now just need to write the code for persisting the change to file. Have a look at the DOMSerializer documentation.
Rom Chatterjee<BR>Sun Certified Java Programmer
I agree. Here's the link:
subject: About Xalan
Xalan - node.setNodeValue(String)
node type text
Node.getNodeValue() is not parsing "
Sample Code For DOM
return as xml document
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014