Skip to main content
Solved

HTML to XML conversion

  • March 11, 2016
  • 5 replies
  • 101 views

parashari
Forum|alt.badge.img+2

Hi,

 

I have a list of HTML files that contain tables and I want to convert those files to XML format.

I tried using a text file reader with HTMLToXHTMLConverter and XML writer. I also attempted HTMLToXHTMLConverter with creator and XML writer but didn't get the desired o/p. Is there some other way out for it? Or I am using different parameters?

Best answer by takashi

Hi @hellblazer, how about using the Text File writer?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

takashi
Celebrity
  • Best Answer
  • March 11, 2016

Hi @hellblazer, how about using the Text File writer?


parashari
Forum|alt.badge.img+2
  • Author
  • March 11, 2016

Hi @hellblazer, how about using the Text File writer?

Hi @takashi, the TextFile writer isn't accepting(red connectors) the o/p from the HTMLTo.. transformer.


takashi
Celebrity
  • March 11, 2016

Hi @takashi, the TextFile writer isn't accepting(red connectors) the o/p from the HTMLTo.. transformer.

Just enter "text_line_data" to the "Output Attribute" parameter of the HTMLtoXHTMLConverter. Alternatively, you can write the resulting XHTML document directly into a file without using a writer, if you set "XHTML Output File" to the "XHTML Output" parameter and set a file path to the "XHTML Filename" parameter.


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • March 11, 2016

Hi @hellblazer, how about using the Text File writer?

Agree completely, the XML writer expects to assemble an XML output, but you already have fully formed XML. The TextLine writer is what you need. Or the techniques Takashi suggests.


parashari
Forum|alt.badge.img+2
  • Author
  • March 11, 2016

Agree completely, the XML writer expects to assemble an XML output, but you already have fully formed XML. The TextLine writer is what you need. Or the techniques Takashi suggests.

Absolutely!!