Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17331

Python XMLSyntaxError: Start tag expected, '

$
0
0

I am trying to read an XML file using lxml but I keep receiving this error:

XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

my code:

import lxmlparser16= lxml.etree.XMLParser(encoding = "utf-16")tree = lxml.etree.parse(input_filepath, parser = parser16)

XML file header:

<?xml version="1.0" encoding="utf-16"?><LoanResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><encompassId>b100ab9f-444-5555-949c-1873ed1ddeb3</encompassId><adverseActionDate>2018-06-20T00:00:00Z</adverseActionDate><applications><Application><id>_borrower1</id><applicationId>_borrower1</applicationId><applicationIndex>0</applicationIndex><assets><Asset><id>Asset/0</id><assetType>LifeInsurance</assetType><borrowerId>_borrower1</borrowerId><isEmpty>true</isEmpty></Asset>

Error:

XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

Appreciate any help / input in resolving.


Viewing all articles
Browse latest Browse all 17331

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>