From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107305 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Is it possible to make xml.load a bit more 'verbose' when it encounters errors? Date: Wed, 13 May 2020 23:00:52 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============1402429321602184801==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21927"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 13 23:01:10 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYyV3-0005bo-VO for gctc-ntg-context-518@m.gmane-mx.org; Wed, 13 May 2020 23:01:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1524C183E13; Wed, 13 May 2020 23:00:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1MJrbLywxMQt; Wed, 13 May 2020 23:00:55 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 38481183E14; Wed, 13 May 2020 23:00:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D372183E12 for ; Wed, 13 May 2020 23:00:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HW7rSGNpdRNM for ; Wed, 13 May 2020 23:00:53 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 233F1183E0C for ; Wed, 13 May 2020 23:00:53 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id 78FCC3E83843 for ; Wed, 13 May 2020 23:00:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1589403652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=bTEQOWkdzlmFO+g4KDiU9aHdYLurWUIewDoQwQydkUQ=; b=AtN/dMUAcUcGogigpdsjsSeu/JOEOYc4nSntKWE8OfxT+zKVV7jOBSSAOGyBiZgPS/VIfN 4E9DcaTxLS0j13+O26ZIaiqJXB0ESksiH5kA2JJx2BmX9vDOToj9euv3ZFphzk3ErYTBwc rHgmTOv9o8XKHIuTfFYLTK37F8jA47iyjm2Jygnj9NUq7JdPJikcAPZf4d3mOQVH6j8rjo ymlRr6px4V3xUR13b5cTqKlrKzcnjKSya/JMwEqLam/9POfsrRu75aW+9eSEmhIa5SgWQA 8h8Wl3e9opXcIh+sSTWIDs5M7V1Zbx8KGlv7F/BdtBJ49OoYZHie9GXid8SAng== X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:107305 Archived-At: --===============1402429321602184801== Content-Type: multipart/alternative; boundary="Apple-Mail=_ACF2AA89-3EA9-4476-81CC-2E5F8D4EEA05" --Apple-Mail=_ACF2AA89-3EA9-4476-81CC-2E5F8D4EEA05 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I am loading an xml.file. I sometimes make mistakes editing that file = and then xml.load creates a string that contains invalid xml file - parsed text At that point I check my file and sometimes (like now) I cannot find the = error. Is there a way to make xml.load somewhat more verbose about where it = encounters the error?=20 G= --Apple-Mail=_ACF2AA89-3EA9-4476-81CC-2E5F8D4EEA05 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii I am loading an xml.file. I sometimes make mistakes editing that file and then xml.load creates a string that contains

<error>invalid xml file - parsed text</error>

At that point I check my file and sometimes (like now) I cannot find the error.

Is th ere a way to make xml.load somewhat more verbose about where it encounters the error? 

G
--Apple-Mail=_ACF2AA89-3EA9-4476-81CC-2E5F8D4EEA05-- --===============1402429321602184801== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1402429321602184801==--