From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110584 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Question about parsing XML and attributes (normally var.at.attrib) with a name with ':' in it Date: Sun, 14 Feb 2021 22:40:58 +0100 Message-ID: <417D24C8-7EA0-4F38-8CE3-E8267CC28CD2@rna.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: multipart/mixed; boundary="===============3000894105592436370==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19176"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 14 22:50:55 2021 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 1lBPI7-0004ti-BB for gctc-ntg-context-518@m.gmane-mx.org; Sun, 14 Feb 2021 22:50:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D165B280217; Sun, 14 Feb 2021 22:50:36 +0100 (CET) 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 bhZ5SiKQRnyP; Sun, 14 Feb 2021 22:50:35 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5F4D82809E6; Sun, 14 Feb 2021 22:50:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 80B1728055E for ; Sun, 14 Feb 2021 22:50:33 +0100 (CET) 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 J4HRqaEPTPhl for ; Sun, 14 Feb 2021 22:50:32 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= X-Greylist: delayed 572 seconds by postgrey-1.36 at zapf.ntg.nl; Sun, 14 Feb 2021 22:50:32 CET 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 96BF4280217 for ; Sun, 14 Feb 2021 22:50:32 +0100 (CET) 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 179AB8264636 for ; Sun, 14 Feb 2021 22:40:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1613338859; 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=yYpw7HzjdJmQxEKhMj6JRmzuByVUdwXifPIUAlwOiWs=; b=k0H8ri5P2BNlL9no28kQ9Ize/0AH1hzFqI31ElTCErpKilZU9uYLET8pvm+3CC6ULAA36g AvRVqTrs8k573P0AO2W7EF364Jl4FGKcEcpXoXRtWSjVbVyBLL4xgfwfGpSU0lyb+gx0tP lneNd0UqXKVt4XOCDV/cdjWMWkaF+x/l3zYhb3u2cERXsEkt9bb8ts1ygxFd2IoYq1mY+z uZze+ngoTR4Cwp2YBc9DDLPcXnr54/PD3bZder8KJQwoGA5x5eulWe89UrmQaqCfi0Qdci SzVuVUh6n+OmDVej0ycMl8L6yyHR4KZOBrtRko+BAI3/d1OOtsjZV99GTA1fWA== X-Mailer: Apple Mail (2.3608.120.23.2.4) 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:110584 Archived-At: --===============3000894105592436370== Content-Type: multipart/alternative; boundary="Apple-Mail=_4626B85F-8581-47A0-A581-42E1A1DE84F0" --Apple-Mail=_4626B85F-8581-47A0-A581-42E1A1DE84F0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 If I have an XML element like this: and it has been read in a lua variable foo, I can get at attribute x = with foo.at.x=20 But how do I get at attribute:B? Gerben Wierda (LinkedIn ) R&A Enterprise Architecture (main site) Book: Chess and the Art of Enterprise=C2=A0Architecture = Book: Mastering ArchiMate --Apple-Mail=_4626B85F-8581-47A0-A581-42E1A1DE84F0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
If I have an XML element like this:

<A x=3D=E2=80=9Cone=E2=80=9D = attribute:B=3D=E2=80=9Ctwo"/>


But how do I get at = attribute:B?


= --Apple-Mail=_4626B85F-8581-47A0-A581-42E1A1DE84F0-- --===============3000894105592436370== 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== --===============3000894105592436370==--