Solved

HTML to XML conversion

  • 11 March 2016
  • 5 replies
  • 20 views

Badge +1

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?

icon

Best answer by takashi 11 March 2016, 05:56

View original

5 replies

Userlevel 2
Badge +17

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

Badge +1

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.

Userlevel 2
Badge +17

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.

Userlevel 3
Badge +13

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.

Badge +1

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