Talk:XML/Input: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
No edit summary
Line 5: Line 5:
The AWK implementation only extracts any text between double quotes. That would not be useful in any practical purpose. I think the task should at least require to extract only the contents of the fields named "Name". Maybe the example input file should contain some other fields that are not to be extracted. --[[User:PauliKL|PauliKL]] 13:00, 1 June 2009 (UTC)
The AWK implementation only extracts any text between double quotes. That would not be useful in any practical purpose. I think the task should at least require to extract only the contents of the fields named "Name". Maybe the example input file should contain some other fields that are not to be extracted. --[[User:PauliKL|PauliKL]] 13:00, 1 June 2009 (UTC)
: I'm tempted to say let the AWK example stand with comments about how it is scraping the XML and not properly parsing it; disappointingly many languages have to do it that way anyway and it is a common (if nasty) technique. —[[User:Dkf|Donal Fellows]] 13:25, 1 June 2009 (UTC)
: I'm tempted to say let the AWK example stand with comments about how it is scraping the XML and not properly parsing it; disappointingly many languages have to do it that way anyway and it is a common (if nasty) technique. —[[User:Dkf|Donal Fellows]] 13:25, 1 June 2009 (UTC)
::This task should definitely require stuctured XML parsing. We already have [[Web Scraping]] for more ad-hoc methods. --[[User:IanOsgood|IanOsgood]] 19:04, 1 June 2009 (UTC)
::This task should definitely require stuctured XML parsing. We already have [[Web Scraping]] for more ad-hoc methods. To aid this, I would change the XML to something less trivial. --[[User:IanOsgood|IanOsgood]] 19:04, 1 June 2009 (UTC)

Revision as of 19:05, 1 June 2009

Interpreting XML?

The name of this task is XML Reading. Are we supposed to interpret the XML structure, or just extract the names in this particular example?

The AWK implementation only extracts any text between double quotes. That would not be useful in any practical purpose. I think the task should at least require to extract only the contents of the fields named "Name". Maybe the example input file should contain some other fields that are not to be extracted. --PauliKL 13:00, 1 June 2009 (UTC)

I'm tempted to say let the AWK example stand with comments about how it is scraping the XML and not properly parsing it; disappointingly many languages have to do it that way anyway and it is a common (if nasty) technique. —Donal Fellows 13:25, 1 June 2009 (UTC)
This task should definitely require stuctured XML parsing. We already have Web Scraping for more ad-hoc methods. To aid this, I would change the XML to something less trivial. --IanOsgood 19:04, 1 June 2009 (UTC)