Bijan
Bijan

Reputation: 8586

xmllint: Remove <?xml version="1.0"?>

I am using xmllint to clean up my .xml file but for some reason the output adds <?xml version="1.0"?> to the first line. Is there a flag to have this be removed?

Upvotes: 10

Views: 2812

Answers (1)

kbulgrien
kbulgrien

Reputation: 4508

Both of the following seem to avoid insertion of <?xml version="1.0"?>:

  • xmllint --exc-c14n data.xml

  • xmllint --c14n data.xml

Hint:

xmllint --help

-or-

man xmllint

Upvotes: 5

Related Questions