Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing USPTO XML file #49

Open
David-Herman opened this issue Aug 16, 2017 · 6 comments
Open

Parsing USPTO XML file #49

David-Herman opened this issue Aug 16, 2017 · 6 comments

Comments

@David-Herman
Copy link

David-Herman commented Aug 16, 2017

Hello,

I have an XML snippet below that does not seem to be parsing well with untangle (1.1.1). I solved my problem via .replace(<claim-text>,'') on the the <claim-text> and </claim-text> tags to create a block of text to work with.

Thank you,
David

<us-claim-statement>What is claimed is: </us-claim-statement>
<claims id="claims">
<claim id="CLM-00001" num="00001">
<claim-text><b>1</b>. A bib device for covering the lap and abdomen of a user, the bib device comprising: 
<claim-text>a lap portion for covering the lap of the user; </claim-text>
<claim-text>an abdomen portion for covering the abdomen of the user; and </claim-text>
<claim-text>a closure band attached to the lap portion, the closure band disposed about the lap portion and the abdomen portion when the bib device is in a stowed configuration. </claim-text>
</claim-text>
 </claim>
<claim id="CLM-00002" num="00002">
<claim-text><b>2</b>. The bib device of <claim-ref idref="CLM-00001">claim 1</claim-ref>, wherein the lap portion and the abdomen portion each comprise a material selected from the group consisting of a substantially absorbent material, a substantially water-resistant material, and a combination of a substantially absorbent material and a substantially water-resistant material. </claim-text>
 </claim>
<claim id="CLM-00003" num="00003">
<claim-text><b>3</b>. The bib device of <claim-ref idref="CLM-00001">claim 1</claim-ref>, wherein at least a portion of the closure band attached to the lap portion comprises a fabric selected from the group consisting of a hook-and-loop-type fabric and an elastic fabric. </claim-text>
 </claim>
<claim id="CLM-00004" num="00004">
<claim-text><b>4</b>. The bib device of <claim-ref idref="CLM-00001">claim 1</claim-ref>, further comprising one or more retaining devices attached to a surface of the lap portion. </claim-text>
 </claim>
<claim id="CLM-00005" num="00005">
<claim-text><b>5</b>. The bib device of <claim-ref idref="CLM-00001">claim 1</claim-ref>, further comprising one or more decorative graphics or logos disposed on a surface of the lap portion. </claim-text>
 </claim>
<claim id="CLM-00006" num="00006">
<claim-text><b>6</b>. A method for providing a bib device for covering the lap and abdomen of a user, the method for providing the bib device comprising: 
<claim-text>providing a lap portion for covering the lap of the user; </claim-text>
<claim-text>providing an abdomen portion for covering the abdomen of the user; and </claim-text>
<claim-text>providing a closure band attached to the lap portion, the closure band disposed about the lap portion and the abdomen portion when the bib device is in a stowed configuration. </claim-text>
</claim-text>
 </claim>
<claim id="CLM-00007" num="00007">
<claim-text><b>7</b>. The method for providing the bib device of <claim-ref idref="CLM-00006">claim 6</claim-ref>, wherein the lap portion and the abdomen portion each comprise a material selected from the group consisting of a substantially absorbent material, a substantially water-resistant material, and a combination of a substantially absorbent material and a substantially water-resistant material. </claim-text>
 </claim>
<claim id="CLM-00008" num="00008">
<claim-text><b>8</b>. The method for providing the bib device of <claim-ref idref="CLM-00006">claim 6</claim-ref>, wherein at least a portion of the closure band attached to the lap portion comprises a fabric selected from the group consisting of a hook-and-loop-type fabric and an elastic fabric. </claim-text>
 </claim>
<claim id="CLM-00009" num="00009">
<claim-text><b>9</b>. The method for providing the bib device of <claim-ref idref="CLM-00006">claim 6</claim-ref>, further comprising providing one or more retaining devices attached to a surface of the lap portion. </claim-text>
 </claim>
<claim id="CLM-00010" num="00010">
<claim-text><b>10</b>. The method for providing the bib device of <claim-ref idref="CLM-00006">claim 6</claim-ref>, further comprising providing one or more decorative graphics or logos disposed on a surface of the lap portion.</claim-text>
 </claim>
</claims>
@David-Herman
Copy link
Author

Also facing issues with this block of xml.

<parties>
<applicants>
<applicant sequence="00" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Gellis</last-name>
<first-name>David</first-name>
<address>
<city>Stowe</city>
<state>VT</state>
<country>US</country>
</address>
</addressbook>
<nationality>
<country>US</country>
</nationality>
<residence>
<country>US</country>
</residence>
</applicant>
<applicant sequence="01" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Shaanan</last-name>
<first-name>Gad</first-name>
<address>
<city>La Jolla</city>
<state>CA</state>
<country>US</country>
</address>
</addressbook>
<nationality>
<country>US</country>
</nationality>
<residence>
<country>US</country>
</residence>
</applicant>
<applicant sequence="02" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Duval</last-name>
<first-name>Francois</first-name>
<address>
<city>Terrebonne</city>
<country>CA</country>
</address>
</addressbook>
<nationality>
<country>CA</country>
</nationality>
<residence>
<country>CA</country>
</residence>
</applicant>
<applicant sequence="03" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Debeau</last-name>
<first-name>Serge</first-name>
<address>
<city>Laval</city>
<country>CA</country>
</address>
</addressbook>
<nationality>
<country>CA</country>
</nationality>
<residence>
<country>CA</country>
</residence>
</applicant>
<applicant sequence="04" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Brousseau</last-name>
<first-name>Ivan</first-name>
<address>
<city>Montreal</city>
<country>CA</country>
</address>
</addressbook>
<nationality>
<country>CA</country>
</nationality>
<residence>
<country>CA</country>
</residence>
</applicant>
</applicants>
<correspondence-address>
<addressbook>
<name>Peter D. Aufrichtig;Aufrichtig Stein &#x26; Aufrichtig, P.C.</name>
<address>
<address-1>5th Floor</address-1>
<address-2>300 East 42nd Street</address-2>
<city>New York</city>
<state>NY</state>
<postcode>10017</postcode>
<country>US</country>
</address>
</addressbook>
</correspondence-address>
</parties>

@stchris
Copy link
Owner

stchris commented Sep 15, 2017

Hi. Can you provide a snippet ( or better yet: a failing unit test ) to show what's not working right? Thank you!

@David-Herman
Copy link
Author

Okay so more background. I am trying to parse USPTO xml files from the following link.
https://bulkdata.uspto.gov/data/patent/application/redbook/fulltext/2017/

I had to slice the xml as follows,

    '''
    generator function to return xml substring from xml document with multiple roots
    '''
    i0=0
    while True:
        i0 = content.find(start,i0)
        i1 = content.find(end,i0)
        if i0 < 0 or i1 < 0:
            return # stop iteration
        #return xml content via generator
        yield content[i0+1:i1]+'\n</us-patent-application>'
        i0=i1

my code is as follows

    print (xml)
    xml = untangle.parse(xml)

and the output,

<us-patent-application lang="EN" dtd-version="v4.0 2004-12-02" file="US20050138715A1-20050630.XML" status="PRODUCTION" id="us-patent-application" country="US" date-produced="20050616" date-publ="20050630">
<us-bibliographic-data-application lang="EN" country="US">
<publication-reference>
<document-id>
<country>US</country>
<doc-number>20050138715</doc-number>
<kind>A1</kind>
<date>20050630</date>
</document-id>
</publication-reference>
<application-reference appl-type="utility">
<document-id>
<country>US</country>
<doc-number>10852061</doc-number>
<date>20040524</date>
</document-id>
</application-reference>
<us-application-series-code>10</us-application-series-code>
<us-publication-filing-type>
<us-original-publication-voluntary/>
</us-publication-filing-type>
<classification-ipc>
<edition>07</edition>
<main-classification>A61F009/00</main-classification>
</classification-ipc>
<classification-national>
<country>US</country>
<main-classification>002013000</main-classification>
</classification-national>
<invention-title id="d0e64">Eyeglasses visor and case</invention-title>
<us-related-documents>
<us-provisional-application>
<document-id>
<country>US</country>
<doc-number>60533677</doc-number>
<date>20031230</date>
</document-id>
</us-provisional-application>
</us-related-documents>
<parties>
<applicants>
<applicant sequence="00" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Lawrence</last-name>
<first-name>Richard</first-name>
<address>
<city>Tierra Verde</city>
<state>FL</state>
<country>US</country>
</address>
</addressbook>
<nationality>
<country>US</country>
</nationality>
<residence>
<country>US</country>
</residence>
</applicant>
<applicant sequence="01" app-type="applicant-inventor" designation="us-only">
<addressbook>
<last-name>Lawrence</last-name>
<first-name>Isabel</first-name>
<middle-name>Clare</middle-name>
<address>
<city>Tierra Verde</city>
<state>FL</state>
<country>US</country>
</address>
</addressbook>
<nationality>
<country>US</country>
</nationality>
<residence>
<country>US</country>
</residence>
</applicant>
</applicants>
<correspondence-address>
<addressbook>
<name>DENNIS L. COOK, ESQ.;THE LAW OFFICES OF DENNIS L COOK PLLC</name>
<address>
<address-1>12718 DUPONT CIRCLE</address-1>
<city>TAMPA</city>
<state>FL</state>
<postcode>33626</postcode>
<country>US</country>
</address>
</addressbook>
</correspondence-address>
</parties>
</us-bibliographic-data-application>
<abstract id="abstract">
<p id="p-0001" num="0000">This invention relates to a eyeglass case and visor with a novel method of attachment to the limbs of a pair of eyeglasses, so that the eyeglasses are firmly connected to the visor at the forehead of the wearer of the eyeglasses, in an attitude which keeps it from drooping into the vision range of the user. More particularly, the visor is formed of two plies of material, the top ply is crescent shaped and the bottom ply is crescent shaped with the corners removed to allow for a wide opening pocket and proper placement of attachment bands on the bottom of the top ply of material. The top and bottom plies of material are connected together along the convex edges of the top and bottom plies of material, but are left substantially unconnected along the other edges except for a fastening means, thereby forming a wide opening pocket in which the eyeglasses can be placed without removal of the eyeglass limbs from the visor attachment bands. </p>
</abstract>
<drawings id="DRAWINGS">
<figure id="figure-D00000" num="00000">
<img id="EMI-D00000" he="72.58mm" wi="134.49mm" file="US20050138715A1-20050630-D00000.TIF" alt="embedded image" img-content="drawing" img-format="tif"/>
</figure>
<figure id="figure-D00001" num="00001">
<img id="EMI-D00001" he="99.57mm" wi="180.00mm" file="US20050138715A1-20050630-D00001.TIF" alt="embedded image" img-content="drawing" img-format="tif"/>
</figure>
<figure id="figure-D00002" num="00002">
<img id="EMI-D00002" he="206.25mm" wi="177.12mm" file="US20050138715A1-20050630-D00002.TIF" alt="embedded image" img-content="drawing" img-format="tif"/>
</figure>
<figure id="figure-D00003" num="00003">
<img id="EMI-D00003" he="228.18mm" wi="143.59mm" file="US20050138715A1-20050630-D00003.TIF" alt="embedded image" img-content="drawing" img-format="tif"/>
</figure>
<figure id="figure-D00004" num="00004">
<img id="EMI-D00004" he="127.17mm" wi="205.91mm" file="US20050138715A1-20050630-D00004.TIF" alt="embedded image" img-content="drawing" img-format="tif"/>
</figure>
<figure id="figure-D00005" num="00005">
<img id="EMI-D00005" he="113.79mm" wi="213.95mm" file="US20050138715A1-20050630-D00005.TIF" alt="embedded image" img-content="drawing" img-format="tif"/>
</figure>
</drawings>
<description id="description">
<?cross-reference-to-related-applications description="Cross Reference To Related Applications" end="lead"?>
<heading level="2" id="h-0001">CROSS-REFERENCE TO RELATED APPLICATION </heading>
<p id="p-0002" num="0001"> The present application claims the benefit of previously filed co-pending Provisional Patent Application, Ser. No. 60/533,677.</p>
<?cross-reference-to-related-applications description="Cross Reference To Related Applications" end="tail"?>
<?summary-of-invention description="Summary of Invention" end="lead"?>
<heading level="2" id="h-0002">FIELD OF THE INVENTION </heading>
<p id="p-0003" num="0002"> This invention relates to the field of eyeglass visors and more particularly to an eyeglass visor and eyeglass case combination device that holds the visor firmly in place and allows the eyeglasses to be stored within the visor without detaching the visor from the eyeglass flame. The unique attachment points and their specific configuration also allow the widest variety of eyeglass flames to utilize the visor and case combination as opposed to prior art devices. </p>
<heading level="2" id="h-0003">BACKGROUND OF THE INVENTION </heading>
<p id="p-0004" num="0003"> This invention relates to a visor with a novel method of attachment to the limbs of a pair of eyeglasses, so that the eyeglasses are firmly connected to the visor and the connected visor is worn at the forehead of the wearer of the eyeglasses, in an attitude which allows it to shield the eyes from overhead sun yet still keeps it from significantly drooping down into the vision range of the user. In addition, the attachment bands are uniquely configured to hold a wide variety of eyeglass limbs of vastly different sizes snug to the visor as opposed to the relatively limited types of limbs addressed by the prior arts. More particularly, the visor is formed of two plies of material, the top ply is crescent shaped. The bottom ply is crescent shaped to match and attach to the convex edge of the top ply with the corners removed to allow for a wide opening pocket and proper placement of attachment bands on the bottom of the top ply of material. The opposing edge of the bottom ply is triangular shaped ending in a semicircular tab to extend beyond the concave edge of the top ply and fold over and attach to the top of the top ply. The top and bottom plies of material are connected together along the convex edges of the top and bottom plies of material but are left substantially unconnected along the other edges except for a fastening means, thereby forming a wide opening pocket in which the eyeglasses can be placed without removal of the eyeglass limbs from the visor attachment bands, thus allowing insertion of the eyeglasses into the pocket without removing them from the attachment points. The eyeglasses stay safely and firmly attached to the visor during visor use or case use applications allowing the user additional confidence that the eyeglass will remain secure for instance during vigorous activities, in windy conditions, etc. </p>
<p id="p-0005" num="0004"> Various visors or brims have been manufactured in the past for mounting at the forehead of a person so as to shade the eyes from the sun, etc. Most of the visors are attached to a hat which supports the visor at the forehead of the wearer of the hat. Also, some visors have been developed which comprise the visor with a band or clamp that extends rearwardly from the visor which is to fit about the head of the wearer so as to support the visor at the forehead of the wearer. </p>
<p id="p-0006" num="0005"> U.S. Pat. No. 4,606,453 issued to Burns discloses a visor comprising two plies of crescent shaped material are placed in overlying relationship, with the plies being attached along their convex edges. The concave edges remain unattached to each other, so that a pocket is formed between the plies of material. Loops are formed at opposite edges of the convex edge of the plies of material. The limbs of eyeglasses can inserted through the loops so that the plies of material form a visor at the forehead of the wearer of the eyeglasses. In the alternative, the eyeglasses can be removed from the visor and inserted into the pocket, so that the plies of material form a case for the eyeglasses. But, to utilize the case, the eyeglasses must be removed from the visor. Also, very large or very small limbs are not supported well with this system, causing poor fit to the visor and potential for the visor to compromise the vision of the wearer. Other patents disclosing similar visors that attach to eyeglasses include U.S. Pat. No. 5,533,321, U.S. Pat. No. 5,524,291, and U.S. Pat. No. 4,543,667. </p>
<p id="p-0007" num="0006"> None of these prior art patents disclose the unique features of this invention which allow for the eyeglasses and the visor to remain attached in visor use and also to be inserted in the visor/case while still being attached to the visor, or have the unique connection method to the eyeglass frame that keeps the visor firmly connected at the user's forehead and at an attitude that keeps it from drooping into the vision range of the user. The unique connection method also can accommodate the largest variety of different sized eyeglass limbs, thus establishing a strong advantage over prior art visors. </p>
<heading level="2" id="h-0004">BRIEF DESCRIPTION OF THE INVENTION </heading>
<p id="p-0008" num="0007"> Briefly described, the present invention comprises a sun visor that is to be worn at the forehead of a person, and which is removably attachable to the limbs of eyeglasses of the wearer, with the visor being attached to and supported by the eyeglasses, without a hat or band structure engaging the head of the wearer. The visor comprises a crescent shaped bill that has four elastic bands&#x2014;one looped and one flat in a unique configuration at each of its two opposite corners, such that the limbs of the eyeglasses are inserted through the bands for connection to the visor and for firm support to the visor. For most eyeglass limb attachments, the looped and flat bands work together to support and stabilize the visor to the eyeglasses better than prior arts attachments and hold it in a position at the forehead of the user, causing the visor to be perched at a height slightly above the lenses of the eyeglasses and out of the range of vision of the user. The combination of flat and looped bands uniquely adapt to a large variety of limb sizes by offering attachment options to optimally suit a given set of limbs. For instance the thinnest limbs utilize both elastic bands to firmly support a visor, while a thick limb may utilize one or both looped elastic bands for the same degree of firm support. The visor may also be used without attachment to any glasses if preferred by the user by using a lanyard and cord stop to secure it firmly to the user's forehead. </p>
<p id="p-0009" num="0008"> The visor is formed from two plies of material. The top ply is formed of a semi rigid material in a crescent shape, having one concave edge and one convex edge, and the bottom ply is formed of a flexible material having a similar convex edge but with the corners removed. The opposing edge of the bottom ply is triangular shaped ending in a semicircular tab to extend beyond the concave edge of the top ply and fold over and attach to the top of the top ply. The plies of material are arranged in overlying relationship with the convex edges aligned. The plies of material are attached to each other along the convex edges, which leaves the other edges unattached except for a fastener means. This forms the top and bottom plies of material into a wide opening pocket having the unattached edges of the plies of material forming the pocket opening. The pocket is sized and shaped so as to receive the eyeglasses of the wearer or other similar sized objects. A unique set of attachment means to secure the eyeglasses to the visor are placed on the underside of the top ply in the general area where the corners are removed from the bottom ply such that the visor can remain attached to the eyeglass frame while either the eyeglasses are folded and placed in the visor pocket opening or unfolded and worn normally by the user, thus firmly securing the visor to the eyeglasses both during visor and storage applications. </p>
<p id="p-0010" num="0009"> Thus, it is an object of this invention to provide a visor that is removably mounted to eyeglasses, so that the visor can be snuggly supported to the eyeglass frame and positioned at the forehead of the wearer of the eyeglasses without additional support. The unique attachment bands allow this snug fit over the full range of eyeglass limbs from very thin and wire-like to very thick. </p>
<p id="p-0011" num="0010"> Another object of this invention is to provide a visor that functions both as an eyeglass visor at the face of the wearer of the visor and as a pocket for storing various objects such as eyeglasses and wherein the fold-over of the closure flap allows for the closure of the pocket and the folded-over material forms a soft barrier at the forehead which cushions the forehead from the edges of the pocket. </p>
<p id="p-0012" num="0011"> Another object of this invention is to provide a visor that functions both as an eyeglass visor at the face of the wearer of the visor and as a pocket for storing various objects such as eyeglasses wherein the eyeglasses or other objects can be placed within the pocket without removal of the eyeglasses from the visor. </p>
<p id="p-0013" num="0012"> Other objects, features and advantages of the present invention will become apparent upon reading the following specification, when taken in conjunction with the accompanying drawings.</p>
<?summary-of-invention description="Summary of Invention" end="tail"?>
<?brief-description-of-drawings description="Brief Description of Drawings" end="lead"?>
<heading level="2" id="h-0005">BRIEF DESCRIPTION OF THE DRAWINGS </heading>
<p id="p-0014" num="0013"> For a fuller understanding of the nature and objects of the invention, reference should be made to the following detailed description, taken in connection with the accompanying drawings, in which: </p>
<p id="p-0015" num="0014"> <figref idref="DRAWINGS">FIG. 1</figref> is a perspective illustration of the eyeglasses visor and case, showing the visor and case attached to a pair of eyeglasses; </p>
<p id="p-0016" num="0015"> <figref idref="DRAWINGS">FIG. 2</figref> is a view of the visor and case showing the top and bottom plies; </p>
<p id="p-0017" num="0016"> <figref idref="DRAWINGS">FIG. 3</figref> is a bottom view of the visor and case showing the attachment bands on the exposed bottom of the top ply; </p>
<p id="p-0018" num="0017"> <figref idref="DRAWINGS">FIG. 4</figref> is a bottom view of the visor and case showing the attachment bands on the exposed bottom of the top ply with an eyeglass limb inserted into the attachment bands; and </p>
<p id="p-0019" num="0018"> <figref idref="DRAWINGS">FIG. 5</figref> is a perspective illustration of the eyeglasses visor and case, showing how a pair of eyeglasses is stored within the pocket without being detached from the visor. </p>
<?brief-description-of-drawings description="Brief Description of Drawings" end="tail"?>
<?detailed-description description="Detailed Description" end="lead"?>
<heading level="2" id="h-0006">DETAILED DESCRIPTION </heading>
<p id="p-0020" num="0019"> Referring now in more detail to the drawings, in which like numerals indicate like parts throughout the several views, <figref idref="DRAWINGS">FIG. 1</figref> illustrates the eyeglasses visor and case (<b>1</b>) mounted to a pair of eyeglasses (<b>2</b>). The eyeglasses (<b>2</b>) are of conventional design and include lenses and frame, such frame including foldable limbs (<b>3</b>) and (<b>4</b>). </p>
<p id="p-0021" num="0020"> As shown in <figref idref="DRAWINGS">FIG. 2</figref> the visor and case (<b>1</b>) is formed from a top ply of rigid crescent shaped material (<b>5</b>) that includes a convex edge (<b>7</b>), and a concave edge (<b>9</b>). The bottom ply (<b>6</b>) is formed of a flexible material having a similar convex edge (<b>8</b>) but with the corners removed. The opposing edge (<b>10</b>) of the bottom ply (<b>6</b>) is triangular shaped ending in a semicircular tab to extend beyond the concave edge (<b>9</b>) of the top ply (<b>5</b>) and fold over and attach to the top of the top ply (<b>5</b>). The convex edges (<b>7</b>,<b>8</b>) are attached together along their lengths, as by stitching or adding a banding trim in the usual manner well known to those skilled in the art. Therefore, the visor case is open at the opposing edges (<b>9</b>,<b>10</b>), so that the plies of material form a pocket and the bottom ply (<b>6</b>) triangular shaped edge (<b>10</b>) can be folded over and attach to the top of the top ply (<b>5</b>) thus closing the pocket and forming a cushion of soft material against the forehead of the user. In the preferred embodiment the visor and case (<b>1</b>) is constructed of a fashion fabric top attached to a rigid material such as foam which create the top ply of crescent shaped material (<b>5</b>). The bottom ply (<b>6</b>) is constructed of soft stretchy material. These materials are well known to those skilled in the art. Surfaces which come in contact with the eyeglasses are chosen to be soft material so as not to scratch the eyeglasses. </p>
<p id="p-0022" num="0021"> A releasable fastener means (<b>11</b>) is used to close the pocket. The fastener means (<b>11</b>) illustrated herein are an overlying flap attached to the bottom ply (<b>6</b>) and foldable over and attachable to the top ply (<b>5</b>) by loop and hook connection elements known by the tradename Velcro. Obviously, other fasteners such as snaps, buttons, zippers, etc., could be used if desired. </p>
<p id="p-0023" num="0022"> As shown in <figref idref="DRAWINGS">FIG. 3</figref> two sets of short lengths of elastic band material (<b>12</b>) and (<b>13</b>) are sewn into the bottom of the top ply (<b>5</b>) near the corners in the general area where the corners are removed from the bottom ply (<b>6</b>). The first band material (<b>12</b>) is folded double and attached to the convex edge (<b>7</b>) so as to form a loop that protrudes downwardly from the bottom of the top ply (<b>5</b>). The second band material (<b>13</b>) is attached diagonally across the corner laying flat against the bottom of the top ply (<b>5</b>). The size of the loops is carefully chosen so as to be suitable so that the limbs (<b>3</b>) and (<b>4</b>) of a conventional pair of eyeglasses may fit through both the looped band (<b>12</b>) and the flat band (<b>13</b>) as required by the limb (<b>3</b>,<b>4</b>) size and shown in <figref idref="DRAWINGS">FIG. 4</figref>. Preferably, the band material will be required to stretch slightly to receive the limbs (<b>3</b>) and (<b>4</b>), so that the loops (<b>12</b>) and flat bands (<b>13</b>) function to support the visor (<b>1</b>) snuggly to the eyeglasses and in a stable position above the lenses of the eyeglasses at the user's forehead. The combination of the bands used together allow the eyeglasses to fit snugly to the glasses and accommodate the widest variety of eyeglass limbs. </p>
<p id="p-0024" num="0023"> If the eyeglasses are removed from the face of the wearer and the limbs are folded across the lenses with visor case still attached to the eyeglasses as illustrated in <figref idref="DRAWINGS">FIG. 5</figref>, the missing corners of the bottom ply allows the bottom ply to be widely opened for insertion of the folded eyeglasses into the pocket without removal of the limbs (<b>3</b>, <b>4</b>) from the bands (<b>12</b>, <b>13</b>). As illustrated in the figure, the top and bottom plies of material (<b>5</b>) and (<b>6</b>) can be separated by opening the visor case at the non-attached edges (<b>9</b>, <b>10</b>), which exposes the pocket. The pair of eyeglasses (<b>2</b>) can be inserted in the pocket formed between the plies of material, with the limbs (<b>3</b>, <b>4</b>) of the eyeglasses folded across the lenses. The limbs may be inserted to either the outside or inside of the pocket as users prefer. Once the eyeglasses have been inserted inside the visor case (<b>1</b>), the bottom ply (<b>6</b>) of the visor case (<b>1</b>) can be folded up, over and attached to the top ply (<b>5</b>) to hold the eyeglasses (<b>2</b>) in by the fastening means (<b>11</b>). Of course, while the visor case is not occupied by the eyeglasses (<b>2</b>) other objects such as money, a key, or identification document can be stored in the pocket of the visor (<b>1</b>). </p>
<p id="p-0025" num="0024"> A lanyard (<b>14</b>) can be added, as shown in <figref idref="DRAWINGS">FIG. 5</figref>, as either a permanent attachment such as a heat-shrink attached lanyard cord or a removable attachment using appropriate fasteners such that the visor case (<b>1</b>) can hang around the user's neck and rest against the user's chest when not being worn, either in a visor mode (eyeglasses (<b>2</b>) and visor (<b>1</b>) deployed together) or case mode (eyeglasses (<b>2</b>) attached and inserted into visor case(<b>1</b>)). The removable lanyard attachment may function such that the lanyard (<b>14</b>) can be removed from lanyard attachment connectors (<b>15</b>) on the visor (<b>1</b>) and attached directly to the eye glass limbs (<b>3</b>,<b>4</b>) while the unique attachment bands continue to firmly hold the visor (<b>1</b>) and eyeglasses together. The lanyard attachment connectors (<b>15</b>), when a lanyard is not attached, can be used to secure the visor (<b>1</b>) to other objects such as belts, belt loops, backpacks and purses. </p>
<p id="p-0026" num="0025"> Although this invention has been described in the form of a preferred embodiment, many modifications, additions, and deletions, may be made thereto without departure from the spirit and scope of the invention, a set forth in the following claims. </p>
<?detailed-description description="Detailed Description" end="tail"?>
</description>
<claims id="claims">
<claim id="CLM-00001" num="00001">
<claim-text><b>1</b>. An eyeglass case and visor to be mounted to the eyeglass limbs of a pair of eyeglasses or the like and worn in front of the forehead and above the eyeglasses to shade the eyes comprising: 
<claim-text>a) an upper ply of approximately crescent-shaped material having a concave edge for placement adjacent to the forehead and a convex edge for extending away from the forehead; </claim-text>
<claim-text>b) said concave edge and said convex edge meeting at corners and having eyeglass limbs attachment means fixed to the bottom side of said upper ply of material near to said corners; </claim-text>
<claim-text>c) a lower ply of approximately triangular-shaped material wherein one edge of said lower ply has a convex shape resulting in a convex edge of said lower ply matching said convex edge of said upper ply but shorter in length such that said eyeglass limbs attachment means fixed to said corners of said upper ply are not covered by said lower ply when said upper ply and said lower ply are aligned in an overlying relationship; </claim-text>
<claim-text>d) said lower ply and said upper ply being aligned in an overlying relationship and being attached to each other along their convex edges to form a pocket therebetween; </claim-text>
<claim-text>e) said pocket formed by said upper ply and said lower ply being of a size large enough to substantially contain the eyeglasses when the eyeglass limbs are folded without detaching the eyeglasses from said limb attachment means; and, </claim-text>
<claim-text>f) a releasable ply connection means attached to said upper ply and said lower ply for releasably closing said pocket. </claim-text>
</claim-text>
 </claim>
<claim id="CLM-00002" num="00002">
<claim-text><b>2</b>. The eyeglass case and visor of <claim-ref idref="CLM-00001">claim 1</claim-ref> wherein said releasable ply connection means comprises a first connector member attached to the upper side of said lower ply of material at the angle opposite said convex edge of said lower ply material and a second connector member attached to the upper side of said upper ply of material such that when said bottom ply of material is folded up and around said concave edge of said upper ply of material said first connector member and said second connector member align and detachably connect whereby eyeglasses can be placed in said pocket and the releasable ply connection means can close said pocket about the eyeglasses. </claim-text>
 </claim>
<claim id="CLM-00003" num="00003">
<claim-text><b>3</b>. The eyeglass case and visor of <claim-ref idref="CLM-00001">claim 1</claim-ref> wherein said limb attachment means each comprise one or more bands of flexible material through which the limbs of eyeglasses are received. </claim-text>
 </claim>
<claim id="CLM-00004" num="00004">
<claim-text><b>4</b>. The eyeglass case and visor of <claim-ref idref="CLM-00001">claim 1</claim-ref> and wherein said limb attachments means each comprises a first band of flexible material formed in a loop and with the ends of the first band sewn together and to said upper ply, and a second band of elastic material laid flat across the upper ply of material and attached at said second band ends to said upper ply, whereby when the limbs of a pair of eyeglasses are received in either or both of said first or second band of flexible material the attachment means tend to support the eyeglass case and visor in front of and above the eyeglasses and the attachment means work to snug the visor to the eyeglasses such that the use of either or both of said first or second band of flexible material depends on the specific thickness attribute of said eyeglass limbs and use of these attachment means accommodates a wide variety of eyeglass limbs. </claim-text>
 </claim>
<claim id="CLM-00005" num="00005">
<claim-text><b>5</b>. An eyeglass case and visor to be mounted to the eyeglass limbs of a pair of eyeglasses or the like and worn in front of the forehead and above the eyeglasses to shade the eyes comprising: 
<claim-text>a) an upper ply of approximately crescent-shaped material having a concave edge for placement adjacent to the forehead and a convex edge for extending away from the forehead; </claim-text>
<claim-text>b) said concave edge and said convex edge meeting at corners and having eyeglass limbs attachment means fixed to the bottom side of said upper ply of material near to said corners; </claim-text>
<claim-text>c) a lower ply of approximately triangular-shaped material wherein one edge of said lower ply has a convex shape resulting in a convex edge of said lower ply matching said convex edge of said upper ply but shorter in length such that said eyeglass limbs attachment means fixed to said corners of said upper ply are not covered by said lower ply when said upper ply and said lower ply are aligned in an overlying relationship; </claim-text>
<claim-text>d) said lower ply and said upper ply being aligned in an overlying relationship and being attached to each other along their convex edges to form a pocket therebetween; </claim-text>
<claim-text>e) said pocket formed by said upper ply and said lower ply being of a size large enough to substantially contain the eyeglasses when the eyeglass limbs are folded without detaching the eyeglasses from said limb attachment means; </claim-text>
<claim-text>f) a releasable ply connection means attached to said upper ply and said lower ply for releasably closing said pocket; and, </claim-text>
<claim-text>g) a lanyard attached at the corners of said upper ply of material. </claim-text>
</claim-text>
 </claim>
<claim id="CLM-00006" num="00006">
<claim-text><b>6</b>. The eyeglass case and visor of <claim-ref idref="CLM-00005">claim 5</claim-ref> wherein said releasable ply connection means comprises a first connector member attached to the upper side of said lower ply of material at an angle opposite said convex edge of said lower ply material and a second connector member attached to the upper side of said upper ply of material such that when said bottom ply of material is folded up and around said concave edge of said upper ply of material said first connector member and said second connector member align and detachably connect whereby eyeglasses can be placed in said pocket and the releasable ply connection means can close said pocket about the eyeglasses. </claim-text>
 </claim>
<claim id="CLM-00007" num="00007">
<claim-text><b>7</b>. The eyeglass case and visor of <claim-ref idref="CLM-00005">claim 5</claim-ref> and wherein said limb attachment means each comprise one or more bands of flexible material through which the limbs of eyeglasses are received. </claim-text>
 </claim>
<claim id="CLM-00008" num="00008">
<claim-text><b>8</b>. The eyeglass case and visor of <claim-ref idref="CLM-00005">claim 5</claim-ref> wherein said limb attachments means each comprises a first band of flexible material formed in a loop and with the ends of the first band sewn together and to said upper ply, and a second band of flexible material laid flat across the upper ply of material and attached at said second band ends to said upper ply, whereby when the limbs of a pair of eyeglasses are received in either or both of said first or second band of flexible material the attachment means tend to support the visor in front of the eyeglasses and the attachment means work to snug the visor to the eyeglasses such that the use of either or both of said first or second band of flexible material depends on the specific thickness attribute of said eyeglass limbs and use of these attachment means accommodates a wide variety of eyeglass limbs. </claim-text>
 </claim>
<claim id="CLM-00009" num="00009">
<claim-text><b>9</b>. The eyeglass case and visor of <claim-ref idref="CLM-00005">claim 5</claim-ref> wherein said visor further comprises a permanently attached lanyard connector at the corners of said upper ply of material to which said lanyard can be releasably attached and said lanyard connector allows the eyeglass case and visor to be releasably connected to said lanyard or to a belt, belt loop, backpack, purse or other similar article of the user. </claim-text>
 </claim>
<claim id="CLM-00010" num="00010">
<claim-text><b>10</b>. An eyeglass case and visor to be mounted to the eyeglass limbs of a pair of eyeglasses or the like and worn in front of the forehead and above the eyeglasses to shade the eyes comprising: 
<claim-text>a) an upper ply of approximately crescent-shaped material having a concave edge for placement adjacent to the forehead and a convex edge for extending away from the forehead; </claim-text>
<claim-text>b) said concave edge and said convex edge meeting at corners and having eyeglass limbs attachment means fixed to the bottom side of said upper ply of material near to said corners wherein said limb attachments means each comprises a first band of flexible material formed in a loop and with the ends of the first band sewn together and to said upper ply, and a second band of flexible material laid flat across the upper ply of material and attached at said second band ends to said upper ply, whereby when the limbs of a pair of eyeglasses are received in either or both of said first or second band of flexible material the attachment means tend to support the visor in front of the eyeglasses and the attachment means work to snug the visor to the eyeglasses such that the use of either or both of said first or second band of flexible material depends on the specific thickness attribute of said eyeglass limbs and use of these attachment means accommodates a wide variety of eyeglass limbs; </claim-text>
<claim-text>c) a lower ply of approximately triangular-shaped material wherein one edge of said lower ply has a convex shape resulting in a convex edge of said lower ply matching said convex edge of said upper ply but shorter in length such that said eyeglass limbs attachment means fixed to said corners of said upper ply are not covered by said lower ply when said upper ply and said lower ply are aligned in an overlying relationship; </claim-text>
<claim-text>d) said lower ply and said upper ply being aligned in an overlying relationship and being attached to each other along their convex edges to form a pocket therebetween; </claim-text>
<claim-text>e) said pocket formed by said upper ply and said lower ply being of a size large enough to substantially contain the eyeglasses when the eyeglass limbs are folded without detaching the eyeglasses from said limb attachment means; </claim-text>
<claim-text>f) a releasable ply connection means attached to said upper ply and said lower ply for releasably closing said pocket wherein said releasable ply connection means comprises a first connector member attached to the upper side of said lower ply of material at said angle opposite said convex edge of said lower ply material and a second connector member attached to the upper side of said upper ply of material such that when said bottom ply of material is folded up and around said concave edge of said upper ply of material said first connector member and said second connector member align and detachably connect whereby eyeglasses can be placed in said pocket and the releasable ply connection means can close said pocket about the eyeglasses; and, </claim-text>
<claim-text>g) a lanyard connection means attached at the corners of said upper ply of material wherein said lanyard connection means comprises a permanently attached lanyard connector wherein said lanyard connector allows the eyeglass case and visor to be releasably connected to a lanyard, belt, belt loop, backpack, purse or other similar article of the user.</claim-text>
</claim-text>
 </claim>
</claims>
</us-patent-application>
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-14-b2fa31701952> in <module>()
      2     xml = next(get_substring(f.read()))
      3     print (xml)
----> 4     xml = untangle.parse(xml)

~\AppData\Local\Continuum\anaconda3\lib\site-packages\untangle.py in parse(filename)
    138     sax_handler = Handler()
    139     parser.setContentHandler(sax_handler)
--> 140     if os.path.exists(filename) or is_url(filename):
    141         parser.parse(filename)
    142     else:

~\AppData\Local\Continuum\anaconda3\lib\genericpath.py in exists(path)
     17     """Test whether a path exists.  Returns False for broken symbolic links"""
     18     try:
---> 19         os.stat(path)
     20     except OSError:
     21         return False

ValueError: stat: path too long for Windows

This seems to be a new error.

@David-Herman
Copy link
Author

I solved the above error about the path being too long by adding a try/except.

@David-Herman
Copy link
Author

Also note that in my 1.10.0 version, I can parse the file without issue (Python 3) while my Python 2 1.11.0 is what had thrown the original error.

@stchris
Copy link
Owner

stchris commented Jul 1, 2022

This looks like a limitation on Windows as well as the problem described in #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants