Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8289661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:33:37+00:00 2026-06-08T12:33:37+00:00

Suppose I had the following tags in my XML file: <?xml version=1.0 encoding=utf-8?> <jobs>

  • 0

Suppose I had the following tags in my XML file:

<?xml version="1.0" encoding="utf-8"?>
<jobs>
<job>
<P class="Beaton"><FONT size=3><SPAN style="FONT-FAMILY: Symbol; COLOR: black; mso-ascii-font-family: 'Times New Roman'">�</SPAN><SPAN style="COLOR: black"><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Position accountability<o:p></o:p></FONT></SPAN></FONT></P>
<P class="Beaton"><FONT size=3><SPAN style="FONT-FAMILY: Symbol; COLOR: black; mso-ascii-font-family: 'Times New Roman'">�</SPAN><SPAN style="COLOR: black"><FONT face="Times New Roman"> <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>55 FTEs <o:p></o:p></FONT></SPAN></FONT></P>
</job>
</jobs>

and below is my code:

from xml.sax.handler import ContentHandler
import xml.sax

xml_path = 'windows/xml_file.xml'

try:
    parser = xml.sax.make_parser( )
    parser.parse(open(xml_path))

except (xml.sax.SAXParseException), e:
        print "*** PARSER error: %s" % e

Result :
*** PARSER error: windows/xml_file.xml:4:113: not well-formed <invalid token>

Can anyone tell me what’s wrong in the p tag and how to avoid this kind of error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:33:38+00:00Added an answer on June 8, 2026 at 12:33 pm

    The problem is probably with your FONT tag; the value of the size attribute should be quoted, otherwise this is simply not valid XML.

    You might also run into problems with &nbsp;, which is not a valid XML entity (although it is valid in XHTML). Also, your <jobs> tag is not closed properly; the last line should be </jobs>.

    In general, if you have problems with reading XML files, the first thing is always to check whether the XML file is well-formatted. One possible way to do that is by entering it into the W3C validator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I had a file fonts.css.scss with the following: @font-face { font-family: 'Play'; font-style:
Suppose I had the following method in an object: public class foo { public
Suppose I had the following class: class MyClass { public function Talk() { $Say
Suppose I had the following class: template<typename T> class Value { public: Value(std::string name,
For example, suppose I had written my own class which allowed me to record
Suppose I had the following function: function alertMesg() { alert(This ok function alerts message!);
Suppose I had a MySQL table with the following column:    |variables| 1. | 'a'     | 2.
My XML file consists of a structure that resembles something like the following: <root>
Till now I had been using following code to ftp file from one location
Suppose I had a file that had a lot of text in it. At

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.