Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes XML and Related Technologies and the fly likes How to add a attr in a node suing SAX? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to add a attr in a node suing SAX?" Watch "How to add a attr in a node suing SAX?" New topic
Author

How to add a attr in a node suing SAX?

Yu Chen
Greenhorn

Joined: Feb 11, 2002
Posts: 17
Hi,
I use a defaultHandler to read in a source xml, and then a TransformerHandler to write into a StreamResult.
I'd like to have a additional attribute in a certain tag, for example,
<tag attr1="value1"> -> <tag attr1="value1", attr2="value2">
How to do it using SAX?
Thanks in advance.
-yc
[ February 17, 2004: Message edited by: Yu Chen ]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to add a attr in a node suing SAX?
 
It's not a secret anymore!