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


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
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 ';'

Hi

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.

Code:
sample file.xml 
<abc>
<bcd>
<cde>
<a>sometext</a>
<b>https://www.asdf.com/plaer?foreo=APYlolNO=BPYprotName=UINS%20min</b>
<c>asdf</c>
</cde>
</bcd>
</abc>

tried

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

error:

Code:
parser error : EntityRef: expecting ';'
<b>https://www.asdf.com/plaer?foreo=APYlolNO=BPYprotName=UINS%20min
                                                                       ^(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
    #2  
Old Unix and Linux 06-10-2017
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 18 August 2017, 4:54 AM EDT
Location: San Jose, CA, USA
Posts: 10,462
Thanks: 533
Thanked 3,660 Times in 3,123 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
    #3  
Old Unix and Linux 06-10-2017
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 18 August 2017, 12:40 PM EDT
Location: Aachen, Germany
Posts: 11,173
Thanks: 287
Thanked 3,443 Times in 3,172 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
Reply

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 02:01 PM.