This content has been marked as final. Show 2 replies
I want to update some of it tag's value not tags.XSLT or XPath.
After updating the values when i saved file there are some additional changes by the java which I am not required , becoz this file is third party application.So is that relevant to your question?
Plz resolve this.Only you can resolve the part about 'additional changes'.
e.g. base fileThat's just a matter of setting a DOCTYPE, not a problem.
1. <?xml version="1.0"?>
Updated file showing as :
1. <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ggFile SYSTEM "yes">
2. <sp/>None of these transformations is necessary, as they are entirely equivalent to the original. However you are likely to get them free out of any proper XML API or tool anyway, there is no effort required.
There are no actual updates to any tag values in the above. Did you have further unstated requirements or have you just mis-stated them?
It should also be noted that neither the original nor the result is a valid XML file unless there is more to them than you have shown. It would surprise me if you got any output via that code with that data.
StringWriter writer = new StringWriter();Why waste time and space with a StringWriter? Just use a FileWriter here and transform directly to the file ...
FileWriter fileWriter = new FileWriter(file);... and delete all this.
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
I required this on urgent basis.Your scheduling problems are your own. This is a user to user forum and nobody cares about your schedule except you. Putting statements like that tends only to antagonize people, i.e. has the reverse of the desired effect.
Sorry If i made any wrong query . Thank You very much for your reply . Let me check the things ....