Skip to main content

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?

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


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.


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.


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.


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!!


Reply