rrrfusco
rrrfusco

Reputation: 1119

Remote XML retrieval

I'm retrieving a remote XML file with wget -O remotefile localfile with a cron tab.

Every so often the local file becomes malformed probably because of double whitespace (according to firefox) between the CDATA tags.

Sometimes the parser gives an error for ' > ' missing, but upon checking the xml file the ' > ' exists...

The remote xml file never gives malformed errors when called in the url.

EDIT
It seems CDATA is not parsed by the xml parser. (w3schools)

Is there a way to set wget to retain wellformed XML?

If not wget, What is a good way to continously retrieve a remote XML file and keep it well formed?

Upvotes: 0

Views: 185

Answers (1)

dacracot
dacracot

Reputation: 22338

Try using curl http://wherever.com/remote.xml > local.xml.

Upvotes: 1

Related Questions