question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error trying to parse XML record. Invalid XML source

See original GitHub issue

Hi @MartijnR I am having this error in Both View and Edit of all Submissions for a particular Survey(XForm). I am using kobotoolbox. Could you please give me any information on why I am getting this. (Which XML is invalid Instance xml or XForm xml??)

screenshot from 2019-01-11 13-02-05

Instance xml

<?xml version='1.0' ?><amft8RqNjam86FFDMU92rg id="amft8RqNjam86FFDMU92rg" version="vAs3wFTMepijce5fscQgW7"><formhub><uuid>a10693ddc8e44edca5379507f76e6b37</uuid></formhub><start>2018-10-01T23:01:54.046-04</start><end>2018-10-01T23:04:10.679-04</end><empresa_contratista>OscarMeza</empresa_contratista><cantidad_de_hect_reas_a_mecanizar>1.0</cantidad_de_hect_reas_a_mecanizar><SISTEMA>SIEMBRA_CONVEN</SISTEMA><cultivo_a_establecer>Sesamo</cultivo_a_establecer><siembra_liquida>no</siembra_liquida><georreferencia /><foto_c_dula_beneficiario>1538449341295.jpg</foto_c_dula_beneficiario><firma_beneficiario>1538449357932.jpg</firma_beneficiario><TECNICO_DEAG /><__version__>vAs3wFTMepijce5fscQgW7</__version__><meta><instanceID>uuid:0b326701-3008-4c26-b987-c1abc2791097</instanceID></meta></amft8RqNjam86FFDMU92rg>

Xform xml

<?xml version="1.0" encoding="utf-8"?> <h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <h:head> <h:title>Requisicion de Servicio de Mecanización (O.D.T.)</h:title> <model> <instance> <amft8RqNjam86FFDMU92rg id="amft8RqNjam86FFDMU92rg" version="vAs3wFTMepijce5fscQgW7"> <formhub> <uuid/> </formhub> <start/> <end/> <empresa_contratista/> <cantidad_de_hect_reas_a_mecanizar/> <SISTEMA/> <cultivo_a_establecer/> <siembra_liquida/> <georreferencia/> <foto_c_dula_beneficiario/> <firma_beneficiario/> <TECNICO_DEAG/> <__version__/> <meta> <instanceID/> </meta> </amft8RqNjam86FFDMU92rg> </instance> <bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/amft8RqNjam86FFDMU92rg/start" type="dateTime"/> <bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/amft8RqNjam86FFDMU92rg/end" type="dateTime"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/empresa_contratista" required="true()" type="select1"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/cantidad_de_hect_reas_a_mecanizar" required="false()" type="decimal"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/SISTEMA" required="false()" type="select1"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/cultivo_a_establecer" required="true()" type="select1"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/siembra_liquida" required="true()" type="select1"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/georreferencia" required="false()" type="geopoint"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/foto_c_dula_beneficiario" required="false()" type="binary"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/firma_beneficiario" required="false()" type="binary"/> <bind nodeset="/amft8RqNjam86FFDMU92rg/TECNICO_DEAG" required="false()" type="binary"/> <bind calculate="'vAs3wFTMepijce5fscQgW7'" nodeset="/amft8RqNjam86FFDMU92rg/__version__" type="string"/> <bind calculate="concat('uuid:', uuid())" nodeset="/amft8RqNjam86FFDMU92rg/meta/instanceID" readonly="true()" type="string"/> <bind calculate="'a10693ddc8e44edca5379507f76e6b37'" nodeset="/amft8RqNjam86FFDMU92rg/formhub/uuid" type="string"/> </model> </h:head> <h:body> <select1 ref="/amft8RqNjam86FFDMU92rg/empresa_contratista"> <label>EMPRESA CONTRATISTA</label> <item> <label>Prossoner</label> <value>prossoner</value> </item> <item> <label>Bufaliz</label> <value>bufaliz</value> </item> <item> <label>Oscar Meza</label> <value>OscarMeza</value> </item> <item> <label>V.P.C.</label> <value>VPC</value> </item> <item> <label>Potenza</label> <value>Potenza</value> </item> <item> <label>Rural Urundey</label> <value>rural_urundey</value> </item> <item> <label>SINAI S.R.L.</label> <value>sinai_s_r_l</value> </item> <item> <label>Yvype S.R.L.</label> <value>yvype_s_r_l</value> </item> <item> <label>FELIX MANUEL BRIZUELA RODAS</label> <value>felix_manuel_b</value> </item> <item> <label>Enrique Cadogan</label> <value>enrique_cadoga</value> </item> <item> <label>Gabino Rodriguez</label> <value>gabino_rodrigu</value> </item> </select1> <input ref="/amft8RqNjam86FFDMU92rg/cantidad_de_hect_reas_a_mecanizar"> <label>CANTIDAD DE HECTÁREAS</label> </input> <select1 ref="/amft8RqNjam86FFDMU92rg/SISTEMA"> <label>SISTEMA</label> <item> <label>SIEMBRA CONVENCIONAL</label> <value>SIEMBRA_CONVEN</value> </item> <item> <label>SIEMBRA DIRECTA</label> <value>SIEMBRA_DIRECT</value> </item> <item> <label>REFORESTACION</label> <value>REFORESTACION</value> </item> </select1> <select1 ref="/amft8RqNjam86FFDMU92rg/cultivo_a_establecer"> <label>CULTIVO A ESTABLECER</label> <item> <label>Maiz</label> <value>Maiz</value> </item> <item> <label>Soja</label> <value>Soja</value> </item> <item> <label>Sesamo</label> <value>Sesamo</value> </item> <item> <label>Algodon</label> <value>Algodon</value> </item> </select1> <select1 ref="/amft8RqNjam86FFDMU92rg/siembra_liquida"> <label>SIEMBRA LIQUIDA</label> <item> <label>Si</label> <value>si</value> </item> <item> <label>No</label> <value>no</value> </item> </select1> <input ref="/amft8RqNjam86FFDMU92rg/georreferencia"> <label>GEORREFERENCIA (no es obligatorio)</label> <hint>GPS coordinates can only be collected when outside.</hint> </input> <upload mediatype="image/*" ref="/amft8RqNjam86FFDMU92rg/foto_c_dula_beneficiario"> <label>FOTO CÉDULA BENEFICIARIO</label> </upload> <upload appearance="signature" mediatype="image/*" ref="/amft8RqNjam86FFDMU92rg/firma_beneficiario"> <label>FIRMA BENEFICIARIO</label> </upload> <upload appearance="signature" mediatype="image/*" ref="/amft8RqNjam86FFDMU92rg/TECNICO_DEAG"> <label>FIRMA TÉCNICO MAG (OPCIONAL)</label> </upload> </h:body> </h:html>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MartijnRcommented, Jan 23, 2019

Great! Thanks for following up!

1reaction
awemulyacommented, Jan 21, 2019

Hi @MartijnR I have digged more into the problem from Use cases and It works well when form is filled from enketo-express and enketo-transformer. But shows parse error on Submission sent from Collect. screenshot from 2019-01-21 11-35-42 screenshot from 2019-01-21 11-35-37

enketo sent xml is <amaJBBc6jgdC27p7KtyxX4 xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" id="amaJBBc6jgdC27p7KtyxX4" version="vf5Ku5xrvn4B96yX3FGtMg"> <formhub> <uuid>f8ed0ce5b2434ca88c6b03bb0fc5592c</uuid> </formhub> <start>2019-01-21T11:25:36.256+06:45</start> <end>2019-01-21T11:25:36.258+06:45</end> <empresa_contratista>sinai_s_r_l</empresa_contratista> <cantidad_de_hect_reas_a_mecanizar/> <SISTEMA>SIEMBRA_DIRECT</SISTEMA> <cultivo_a_establecer>Soja</cultivo_a_establecer> <siembra_liquida>no</siembra_liquida> <georreferencia>27.702414 85.323511 0.1 0.1</georreferencia> <foto_c_dula_beneficiario type="file">Screenshot from 2019-01-12 10-32-27-11_27_15.png</foto_c_dula_beneficiario> <firma_beneficiario type="file">signature-11_27_19.png</firma_beneficiario> <TECNICO_DEAG type="file">signature-11_27_21.png</TECNICO_DEAG> <__version__>vFcLzmnYxyLZn6v56qJx77</__version__> <_version_>vf5Ku5xrvn4B96yX3FGtMg</_version_> <meta> <instanceID>uuid:146200ab-bfef-48c6-9afa-90d744425b30</instanceID> </meta> </amaJBBc6jgdC27p7KtyxX4>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error trying to parse XML record. Invalid XML source
Hello team, I have this issue: What would the problem be? I am trying to submit the remaining 15 articles but it is...
Read more >
How to parse invalid (bad / not well-formed) XML?
Anyways, I still have to try and figure out a way to parse it. We're using javax.xml.parsers.DocumentBuilder and I'm getting an error on...
Read more >
Error message in Excel when you try to import data from a ...
Error message in Excel when you try to import data from a Web source: "Invalid XML ... This behavior occurs because the Excel...
Read more >
XML Parser Error Codes - IBM
XML Parser Error Codes ; 2, The parser found an invalid start of a processing instruction, element, comment, or document type declaration outside...
Read more >
Silent data loss when response contains characters invalid for ...
Silent data loss when response contains characters invalid for XML PCDATA #181 ... Error trying to parse XML record. Invalid XML source".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found