• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

writing XML

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic