aspose file tools*
The moose likes XML and Related Technologies and the fly likes writing XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "writing XML" Watch "writing XML" New topic
Author

writing XML

Murad Iqbal
Ranch Hand

Joined: Dec 09, 2003
Posts: 90
Guys, I am a newbie in XML. I need to transform HTML to XML. Any suggestions as what APIs should be used? I would prefer if any third parties arent used. Does JAXP or any other current packages in SDK1.4 support this?

Another question is that say I have read some XML file in DOM, made some changes in it. Now how can I write that modified file to replace the original or somewhere else?
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
On your first quexstion, hmmm....if you really don't want any third party tools, then the only thing I can think of is to parse the HTML using SAX and add any missing end elements. What is a start element is missing? Remove the end element would me my answer - HTML ignores it anyway so its not really adding value to your HTML.

Additionally, search this forum for HTML to XML converter. It was discussed before, but I don't have the links handy.

On your second question, we have an FAQ just for that.

- m


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
Don't get me started about those stupid light bulbs.
 
subject: writing XML