Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Xmllint parser error : EntityRef: expecting ';'

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 06-10-2017
ananan ananan is offline
Registered User
Join Date: Jun 2017
Last Activity: 12 July 2017, 2:38 AM EDT
Posts: 22
Thanks: 5
Thanked 0 Times in 0 Posts
Xmllint parser error : EntityRef: expecting ';'


I have an XML file which contains html urls in that node values. When i use xmllint to parse that, i am getting error (because of the sympols in the url). i have used --html option but it throws other tag errors.

Please guide me.

sample file.xml 


echo "cat /abc/bcd/cde/a/text()" | xmllint  --nocdata --html --shell file.xml | sed '1d;$d'


parser error : EntityRef: expecting ';'
                                                                       ^(this symbol was pointing in the = sign)

Moderator's Comments:
Xmllint parser error : EntityRef: expecting ';' Please use CODE tags (not QUOTE tags) when displaying sample input, output, and code segments. (Using QUOTE tags collapses sequences of zero or more<space> and <tab> characters at the start of a line to nothing and other sequences of one or more <space> and <tab> characters to a single <space>.

Last edited by ananan; 06-12-2017 at 01:26 PM..
Sponsored Links
Old Unix and Linux 06-10-2017
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 22 October 2017, 2:06 AM EDT
Location: San Jose, CA, USA
Posts: 10,554
Thanks: 554
Thanked 3,697 Times in 3,154 Posts
Putting a ... in your diagnostic message instead of the actual text that was displayed makes it impossible for us to see where in that message xmlint thought there should be a semicolon character.

Please post the exact diagnostic message xmlint printed in CODE tags (not QUOTE tags).
Sponsored Links
Old Unix and Linux 06-10-2017
RudiC RudiC is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 22 October 2017, 3:27 AM EDT
Location: Aachen, Germany
Posts: 11,481
Thanks: 310
Thanked 3,561 Times in 3,276 Posts
I'm afraid it's the browser or the server or the editor? that added [URL] tags and put the ... in lieu of the real partial string. I removed the [URL] tags to display the entire string; unfortunately, the caret still point to nowhere...
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script not returning what I am expecting simpsa27 UNIX for Beginners Questions & Answers 3 03-29-2017 05:35 AM
Linux xmllint schema validation fails but error code 0 mknag Shell Programming and Scripting 4 07-03-2013 07:38 AM
grep, expecting 1 result, getting more s1ckle UNIX for Dummies Questions & Answers 3 09-21-2010 10:04 AM
expecting answers for these questions? kingston Solaris 4 05-26-2010 07:44 AM
Syntax error: word unexpected (expecting ")") figaro Shell Programming and Scripting 9 03-06-2009 02:18 PM

All times are GMT -4. The time now is 09:46 AM.