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 8810969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:14:52+00:00 2026-06-14T03:14:52+00:00

This is the XML DTD (at least I think it is the DTD, I

  • 0

This is the XML DTD (at least I think it is the DTD, I am not that versed in XML so please correct me if I am wrong):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE PATDOC SYSTEM "-US-Grant-025xml.dtdST32" [
<!ENTITY USD0484671-20040106-D00000.TIF SYSTEM "USD0484671-20040106-D00000.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00001.TIF SYSTEM "USD0484671-20040106-D00001.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00002.TIF SYSTEM "USD0484671-20040106-D00002.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00003.TIF SYSTEM "USD0484671-20040106-D00003.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00004.TIF SYSTEM "USD0484671-20040106-D00004.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00005.TIF SYSTEM "USD0484671-20040106-D00005.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00006.TIF SYSTEM "USD0484671-20040106-D00006.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00007.TIF SYSTEM "USD0484671-20040106-D00007.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00008.TIF SYSTEM "USD0484671-20040106-D00008.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00009.TIF SYSTEM "USD0484671-20040106-D00009.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00010.TIF SYSTEM "USD0484671-20040106-D00010.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00011.TIF SYSTEM "USD0484671-20040106-D00011.TIF" NDATA TIF>
<!ENTITY USD0484671-20040106-D00012.TIF SYSTEM "USD0484671-20040106-D00012.TIF" NDATA TIF>
]>
<PATDOC DTD="2.5" STATUS="Build 20030724">

I get the following error when I try to run my python parser

Traceback (most recent call last):
  File "C:\Users\John\Desktop\FINAL BART ALL INFO-Magic Bullet.py", line 75, in <module>
    doc = etree.XML(item)
  File "lxml.etree.pyx", line 2723, in lxml.etree.XML (src/lxml/lxml.etree.c:52448)
  File "parser.pxi", line 1573, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:79932)
  File "parser.pxi", line 1452, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:78774)
  File "parser.pxi", line 960, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:75389)
  File "parser.pxi", line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)
  File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)
  File "parser.pxi", line 585, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71955)
XMLSyntaxError: Entity 'num' not defined, line 166, column 84

This takes Patent XML data and parses it out into a delimited file. also, I used “import urllib2, os, zipfile from lxml import etree”

  • 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-14T03:14:54+00:00Added an answer on June 14, 2026 at 3:14 am

    &num; is an entity for ‘#’, but lxml thinks it isn’t well formed XML.

    Check the DTD for the file to see whether it allows entities – if there’s no DTD that’s part of the problem.

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

Sidebar

Related Questions

This is my xhtml code : <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC -//W3C//DTD
I have this html doc: <?xml version=1.0 encoding=utf-8?><!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>
Given this XML: <?xml version=1.0 encoding=utf-8?> <content dataType=XML> <item type=Promotion name=Sample Promotion expires=04/01/2009> <![CDATA[
Having this XML view: <?xml version=1.0 encoding=utf-8?> <LinearLayout android:id=@+id/myScrollLayout android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical xmlns:android=http://schemas.android.com/apk/res/android> <ScrollView
I have this xml file: data_out.xml <?xml version=1.0 ?> <!DOCTYPE allproperty SYSTEM data_out.dtd> <allproperty>
I have written this XML file: <!--bookstore.xml --> <?xml version=1.0?> <!DOCTYPE reviews SYSTEM bookstore.dtd>
Well I have this XML here, <?xml version=1.0?> <!DOCTYPE reviews SYSTEM bookstore.dtd> <bookstore> <location>Port
Given an XML document like this: <!DOCTYPE doc SYSTEM 'http://www.blabla.com/mydoc.dtd'> <author>john</author> <doc> <title>&title;</title> </doc>
I Want to create a DTD schema for this xml document: <root> <student> <name>
I'm trying to validate this XML document: <?xml version=1.0?> <CONTACTS> <CONTACT CONTACT_NUM = 1>

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.