From gordon.leonard@btinternet.com Wed Mar 03 12:05:48 2010 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NmnKm-0006Sf-75 for libxmlplusplus-general@lists.sourceforge.net; Wed, 03 Mar 2010 12:05:48 +0000 X-ACL-Warn: Received: from web86505.mail.ird.yahoo.com ([217.146.188.130]) by sfi-mx-3.v28.ch3.sourceforge.com with smtp (Exim 4.69) id 1NmnKl-0008N9-3m for libxmlplusplus-general@lists.sourceforge.net; Wed, 03 Mar 2010 12:05:48 +0000 Received: (qmail 78685 invoked by uid 60001); 3 Mar 2010 11:39:00 -0000 Message-ID: <644492.77492.qm@web86505.mail.ird.yahoo.com> X-YMail-OSG: kq9hC6wVM1kdE.ncoQY2ASpq7Is2jzGvMHas6IPquV4Y9ku Lt0Z0.QDdJNWyKVvN.GiFajK.5xO7kFi22z2HCLxQU7VCiuO7jvy3qVq_wRZ hOXcysaswh3M2BfFdc4rSGJfwlC.AZRv21lk9_sBmekbgMSlXU1BzN6ochZf S_ytq1GW7lhuQVwa0IhYuXVDB.ikFtwUuR3LeGjgwMSGl5gspwoozj1Sg62l t.JMX8v4FDADK9x9hnLKNHlpsBO2U6qAoEdXF.VRMcAmJ93WFfMJ0tBQbaQZ 4 Received: from [193.128.72.68] by web86505.mail.ird.yahoo.com via HTTP; Wed, 03 Mar 2010 11:39:00 GMT X-Mailer: YahooMailRC/300.3 YahooMailWebService/0.8.100.260964 Date: Wed, 3 Mar 2010 11:39:00 +0000 (GMT) From: To: libxmlplusplus-general@lists.sourceforge.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1253843827-1267616340=:77492" X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1NmnKl-0008N9-3m Subject: [libxml++] Lareg amount of text in a child X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 12:05:48 -0000 --0-1253843827-1267616340=:77492 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi,=0A=0AI'm relatively new to C++ and libxml++ and looking for the best wa= y of adding a signifcant, but varying amount of text to a child element. Cu= rrently I declare my child text as a char[256], but actually need something= much bigger than this. =0A=0AI have an option to break my string down, but= haven;t found a way of appending to the end of the current value.=0A=0AHop= e that make sense, however obscure the application maybe.=0A=0Aregards=0A= =0AGordon --0-1253843827-1267616340=:77492 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,

I'm relatively new to C++ and libxml++ and loo= king for the best way of adding a signifcant, but varying amount of text to= a child element. Currently I declare my child text as a char[256], but act= ually need something much bigger than this.

I have an option to bre= ak my string down, but haven;t found a way of appending to the end of the c= urrent value.

Hope that make sense, however obscure the application = maybe.

regards

Gordon

=0A
--0-1253843827-1267616340=:77492-- From goncalo.magno@gmail.com Mon Mar 08 05:13:35 2010 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NoVHb-00075j-QI for libxmlplusplus-general@lists.sourceforge.net; Mon, 08 Mar 2010 05:13:35 +0000 Received-SPF: pass (sfi-mx-3.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.218.218 as permitted sender) client-ip=209.85.218.218; envelope-from=goncalo.magno@gmail.com; helo=mail-bw0-f218.google.com; Received: from mail-bw0-f218.google.com ([209.85.218.218]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NoVHa-0000eM-W0 for libxmlplusplus-general@lists.sourceforge.net; Mon, 08 Mar 2010 05:13:35 +0000 Received: by bwz10 with SMTP id 10so3172604bwz.2 for ; Sun, 07 Mar 2010 21:13:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.137.1 with SMTP id u1mr4365731bkt.151.1268025208319; Sun, 07 Mar 2010 21:13:28 -0800 (PST) From: "M&M" Date: Mon, 8 Mar 2010 05:13:08 +0000 Message-ID: To: libxmlplusplus-general@lists.sourceforge.net Content-Type: multipart/alternative; boundary=0015173fe84c1bb14504814320a7 X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1NoVHa-0000eM-W0 Subject: [libxml++] Problem building xml++-2.6 in windows (VS2008) with gendef tool generating a runtime error X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 05:13:35 -0000 --0015173fe84c1bb14504814320a7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, I'm just starting with libxml++, but already got into trouble... When I try to build the library I get this error: *Error 1 error PRJ0019: A tool returned an error code from "Generate libxml++ def file" xml++-2.6 xml++-2.6* As far as I understand, this is gendef tool that is failing (called as a Pre-link Event) after compilation and before linking. About gendef I am sur= e that was built without even a warning, however when called in xml++-2.6 project it generates an error. I've checked how it is called, and here it is: *$(SolutionDir)gendef\$(ConfigurationName)\gendef $(ConfigurationName)\$(InputName).def $(TargetFileName) $(IntDir)\*.obj $(IntDir)\exceptions\*.obj $(IntDir)\io\*.obj $(IntDir)\nodes\*.obj $(IntDir)\parsers\*.obj $(IntDir)\validators\*.obj *I have also tried to execute this command from the command line (substituting each macro by its value)*, *and I got an exception error and this message in command line: *'dumpbin' is not recognized as an internal or external command, operable program or batch file.* Any idea of what might be the problem? Thanks in advance, Gon=E7alo --0015173fe84c1bb14504814320a7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I'm just starting with libxml++, but already got into tro= uble... When I try to build the library I get this error:

Error=A0=A0=A0 1=A0=A0=A0 error PRJ0019: A tool returned an er= ror code from "Generate libxml++ def file"=A0=A0=A0 xml++-2.6=A0= =A0=A0 xml++-2.6

As far as I understand, this is gendef tool that is fa= iling (called as a Pre-link Event) after compilation and before linking. Ab= out gendef I am sure that was built without even a warning, however when ca= lled in xml++-2.6 project it generates an error. I've checked how it is= called, and here it is:

$(SolutionDir)gendef\$(ConfigurationName)\gendef= $(ConfigurationName)\$(InputName).def $(TargetFileName) $(IntDir)\*.obj $(= IntDir)\exceptions\*.obj $(IntDir)\io\*.obj $(IntDir)\nodes\*.obj $(IntDir)= \parsers\*.obj $(IntDir)\validators\*.obj

I have also tried to execute this command from= the command line (substituting each macro by its value), = and I got an exception error and this message in comma= nd line:

'dumpbin' is not recognized as an intern= al or external command, operable program or batch file.
<= br>Any idea of what might be the problem?

Thanks in advance,
Gon= =E7alo


--0015173fe84c1bb14504814320a7-- From Nic.Reveles@gatech.edu Mon Mar 22 22:58:16 2010 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NtqZc-0001v3-Nk for libxmlplusplus-general@lists.sourceforge.net; Mon, 22 Mar 2010 22:58:16 +0000 X-ACL-Warn: Received: from deliverator10.gatech.edu ([130.207.160.100]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NtqZZ-0005cB-OX for libxmlplusplus-general@lists.sourceforge.net; Mon, 22 Mar 2010 22:58:16 +0000 Received: from deliverator6.gatech.edu (deliverator6.gatech.edu [130.207.160.71]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (Client did not present a certificate) by deliverator10.gatech.edu (Postfix) with ESMTP id CE1474C8AF for ; Mon, 22 Mar 2010 18:29:08 -0400 (EDT) Received: from deliverator6.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 9789920C10A for ; Mon, 22 Mar 2010 18:29:02 -0400 (EDT) Received: from mail5.gatech.edu (mail5.gatech.edu [130.207.185.165]) by deliverator6.gatech.edu (Postfix) with ESMTP id 1A8C420C107 for ; Mon, 22 Mar 2010 18:29:00 -0400 (EDT) Received: from mail5.gatech.edu (localhost [127.0.0.1]) by mail5.gatech.edu (Postfix) with ESMTP id DCDE41FFA9 for ; Mon, 22 Mar 2010 18:28:59 -0400 (EDT) Date: Mon, 22 Mar 2010 18:28:59 -0400 (EDT) From: Nic.Reveles@gatech.edu Sender: Nic.Reveles@gatech.edu To: libxmlplusplus-general@lists.sourceforge.net Message-ID: <619278870.297461269296939692.JavaMail.root@mail5.gatech.edu> In-Reply-To: <915574711.296901269296736810.JavaMail.root@mail5.gatech.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [130.207.185.220] X-Mailer: Zimbra 5.0.22_GA_3210.RHEL5_64 (ZimbraWebClient - FF3.0 (Win)/5.0.22_GA_3210.RHEL5_64) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1NtqZZ-0005cB-OX Subject: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Glib::ConvertError' X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 22:58:16 -0000 It seems I am having the same issue (or very similar) someone had back in 2= 008: http://sourceforge.net/mailarchive/forum.php?thread_name=3D481EEFF6.50= 20002%40balabit.hu&forum_name=3Dlibxmlplusplus-general 1) copied the DOM parser code from the "short manual" (http://libxmlplusplu= s.sourceforge.net/docs/manual/html/ar01s02.html#id2504579) 2) compiled it without problem 3) ran it on a simple "example.xml" file.=20 It crashes with 'Glib::ConvertError'. Removing the UTF-8 characters fixes t= he problem, but obviously that's not a great solution. Also, if I do not at= tempt to 'cout' the field with UTF-8 characters, it also does not crash, bu= t I need to output the field. The example output is as follows: ~~~~~~~~~~~~~~~~~ Node name =3D note Node name =3D note line =3D 10 Node name =3D to Node name =3D to line =3D 11 Text Node text =3D "Joe" Node name =3D from Node name =3D from line =3D 12 Text Node text =3D "Jany" Node name =3D heading Node name =3D heading line =3D 13 Text Node text =3D "Reminder Node name =3D body Node name =3D body line =3D 14 Text Node terminate called after throwing an instance of 'Glib::ConvertError' Abort trap: 6 (core dumped) ~~~~~~~~~~~~~~~~~ $ cat example.xml ]> Joe Jany Reminder =C3=90=C3=91=C3=90=C2=B8=C3=90=C2=B2=C3=90=C2=B5=C3=91! Don't forget = me this weekend! ~~~~~~~~~~~~~~~~~~~ I'm running freeBSD 8.0: $ uname -a FreeBSD selever 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC= 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 In general, is it rather difficult to output UTF-8 (requiring special envir= onments)? Any help, tips, or advice would be most appreciated. From murrayc@murrayc.com Tue Mar 23 08:16:34 2010 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NtzHu-0006Wf-6y for libxmlplusplus-general@lists.sourceforge.net; Tue, 23 Mar 2010 08:16:34 +0000 X-ACL-Warn: Received: from hapkido.dreamhost.com ([66.33.216.122]) by sfi-mx-2.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NtzHs-0003qe-ML for libxmlplusplus-general@lists.sourceforge.net; Tue, 23 Mar 2010 08:16:34 +0000 Received: from homiemail-a7.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by hapkido.dreamhost.com (Postfix) with ESMTP id B95F417CEFC for ; Tue, 23 Mar 2010 00:55:07 -0700 (PDT) Received: from [192.168.178.20] (host-88-217-185-158.customer.m-online.net [88.217.185.158]) by homiemail-a7.g.dreamhost.com (Postfix) with ESMTPA id 535BC25C058; Tue, 23 Mar 2010 00:55:01 -0700 (PDT) From: Murray Cumming To: Nic.Reveles@gatech.edu In-Reply-To: <619278870.297461269296939692.JavaMail.root@mail5.gatech.edu> References: <619278870.297461269296939692.JavaMail.root@mail5.gatech.edu> Content-Type: text/plain; charset="UTF-8" Date: Tue, 23 Mar 2010 08:54:58 +0100 Message-ID: <1269330898.2336.2.camel@murrayc-x61> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NtzHs-0003qe-ML Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Glib::ConvertError' X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2010 08:16:34 -0000 On Mon, 2010-03-22 at 18:28 -0400, Nic.Reveles@gatech.edu wrote: > It seems I am having the same issue (or very similar) someone had back = in 2008: http://sourceforge.net/mailarchive/forum.php?thread_name=3D481EE= FF6.5020002%40balabit.hu&forum_name=3Dlibxmlplusplus-general >=20 >=20 > 1) copied the DOM parser code from the "short manual" (http://libxmlplu= splus.sourceforge.net/docs/manual/html/ar01s02.html#id2504579) > 2) compiled it without problem > 3) ran it on a simple "example.xml" file.=20 Could you attach that example.xml file, please. >=20 > It crashes with 'Glib::ConvertError'. Removing the UTF-8 characters fix= es the problem, but obviously that's not a great solution. Also, if I do = not attempt to 'cout' the field with UTF-8 characters, it also does not c= rash, but I need to output the field. >=20 > The example output is as follows: > ~~~~~~~~~~~~~~~~~ > Node name =3D note > Node name =3D note > line =3D 10 >=20 > Node name =3D to > Node name =3D to > line =3D 11 >=20 > Text Node > text =3D "Joe" >=20 > Node name =3D from > Node name =3D from > line =3D 12 >=20 > Text Node > text =3D "Jany" >=20 > Node name =3D heading > Node name =3D heading > line =3D 13 >=20 > Text Node > text =3D "Reminder >=20 > Node name =3D body > Node name =3D body > line =3D 14 >=20 > Text Node > terminate called after throwing an instance of 'Glib::ConvertError' > Abort trap: 6 (core dumped) >=20 > ~~~~~~~~~~~~~~~~~ > $ cat example.xml > > > > > > > ]> > > Joe > Jany > Reminder > =C3=90=C3=91=C3=90=C2=B8=C3=90=C2=B2=C3=90=C2=B5=C3=91! Don't for= get me this weekend! > > ~~~~~~~~~~~~~~~~~~~ >=20 > I'm running freeBSD 8.0: > $ uname -a > FreeBSD selever 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08= UTC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC am= d64 >=20 > In general, is it rather difficult to output UTF-8 (requiring special e= nvironments)? Any help, tips, or advice would be most appreciated. >=20 > -----------------------------------------------------------------------= ------- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Libxmlplusplus-general mailing list > Libxmlplusplus-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libxmlplusplus-general --=20 murrayc@murrayc.com www.murrayc.com www.openismus.com From Nic.Reveles@gatech.edu Tue Mar 23 14:54:50 2010 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nu5VK-0004Lj-E0 for libxmlplusplus-general@lists.sourceforge.net; Tue, 23 Mar 2010 14:54:50 +0000 X-ACL-Warn: Received: from deliverator3.gatech.edu ([130.207.165.163]) by sfi-mx-2.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Nu5VH-0000Dw-6y for libxmlplusplus-general@lists.sourceforge.net; Tue, 23 Mar 2010 14:54:50 +0000 Received: from deliverator3.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id E4E3E39C062; Tue, 23 Mar 2010 10:54:40 -0400 (EDT) Received: from mail5.gatech.edu (mail5.gatech.edu [130.207.185.165]) by deliverator3.gatech.edu (Postfix) with ESMTP id 13C7139C060; Tue, 23 Mar 2010 10:54:39 -0400 (EDT) Received: from mail5.gatech.edu (localhost [127.0.0.1]) by mail5.gatech.edu (Postfix) with ESMTP id D03621FFA8; Tue, 23 Mar 2010 10:54:38 -0400 (EDT) Date: Tue, 23 Mar 2010 10:54:38 -0400 (EDT) From: Nic.Reveles@gatech.edu Sender: Nic.Reveles@gatech.edu To: Murray Cumming Message-ID: <1169375458.61451269356078809.JavaMail.root@mail5.gatech.edu> In-Reply-To: <1892047581.60681269355931688.JavaMail.root@mail5.gatech.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1490_1571079843.1269356078803" X-Originating-IP: [130.207.185.220] X-Mailer: Zimbra 5.0.22_GA_3210.RHEL5_64 (ZimbraWebClient - FF3.0 (Win)/5.0.22_GA_3210.RHEL5_64) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1Nu5VH-0000Dw-6y Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Glib::ConvertError' X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2010 14:54:50 -0000 ------=_Part_1490_1571079843.1269356078803 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yes, this file is attached. Inside, I simply added a short Russian word to = an example I found online and then saved with the UTF-8 encoding. Nic ----- Original Message ----- From: "Murray Cumming" To: "Nic Reveles" Cc: libxmlplusplus-general@lists.sourceforge.net Sent: Tuesday, March 23, 2010 3:54:58 AM GMT -05:00 US/Canada Eastern Subject: Re: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Gli= b::ConvertError' On Mon, 2010-03-22 at 18:28 -0400, Nic.Reveles@gatech.edu wrote: > It seems I am having the same issue (or very similar) someone had back in= 2008: http://sourceforge.net/mailarchive/forum.php?thread_name=3D481EEFF6.= 5020002%40balabit.hu&forum_name=3Dlibxmlplusplus-general >=20 >=20 > 1) copied the DOM parser code from the "short manual" (http://libxmlplusp= lus.sourceforge.net/docs/manual/html/ar01s02.html#id2504579) > 2) compiled it without problem > 3) ran it on a simple "example.xml" file.=20 Could you attach that example.xml file, please. >=20 > It crashes with 'Glib::ConvertError'. Removing the UTF-8 characters fixes= the problem, but obviously that's not a great solution. Also, if I do not = attempt to 'cout' the field with UTF-8 characters, it also does not crash, = but I need to output the field. >=20 > The example output is as follows: > ~~~~~~~~~~~~~~~~~ > Node name =3D note > Node name =3D note > line =3D 10 >=20 > Node name =3D to > Node name =3D to > line =3D 11 >=20 > Text Node > text =3D "Joe" >=20 > Node name =3D from > Node name =3D from > line =3D 12 >=20 > Text Node > text =3D "Jany" >=20 > Node name =3D heading > Node name =3D heading > line =3D 13 >=20 > Text Node > text =3D "Reminder >=20 > Node name =3D body > Node name =3D body > line =3D 14 >=20 > Text Node > terminate called after throwing an instance of 'Glib::ConvertError' > Abort trap: 6 (core dumped) >=20 > ~~~~~~~~~~~~~~~~~ > $ cat example.xml > > > > > > > ]> > > Joe > Jany > Reminder > =C3=90=C3=91=C3=90=C2=B8=C3=90=C2=B2=C3=90=C2=B5=C3=91! Don't forge= t me this weekend! > > ~~~~~~~~~~~~~~~~~~~ >=20 > I'm running freeBSD 8.0: > $ uname -a > FreeBSD selever 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 U= TC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >=20 > In general, is it rather difficult to output UTF-8 (requiring special env= ironments)? Any help, tips, or advice would be most appreciated. >=20 > -------------------------------------------------------------------------= ----- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Libxmlplusplus-general mailing list > Libxmlplusplus-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libxmlplusplus-general --=20 murrayc@murrayc.com www.murrayc.com www.openismus.com ------=_Part_1490_1571079843.1269356078803 Content-Type: application/xml; name=example.xml Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=example.xml 77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCgo8IURPQ1RZUEUgbm90 ZSBbCiAgDQo8IUVMRU1FTlQgbm90ZSAgICAodG8sZnJvbSxoZWFkaW5nLGJvZHkpPgogIA0KPCFF TEVNRU5UIHRvICAgICAgKCNQQ0RBVEEpPgogIA0KPCFFTEVNRU5UIGZyb20gICAgKCNQQ0RBVEEp PgogIA0KPCFFTEVNRU5UIGhlYWRpbmcgKCNQQ0RBVEEpPgogIA0KPCFFTEVNRU5UIGJvZHkgICAg KCNQQ0RBVEEpPgpdPg0KDQoKCjwhLS0gRWRpdGVkIGJ5IFhNTFNweSAtLT4KDQo8bm90ZT4KDQog ICA8dG8+Sm9lPC90bz4KDQogICA8ZnJvbT5KYW55PC9mcm9tPgoNCiAgIDxoZWFkaW5nPlJlbWlu ZGVyPC9oZWFkaW5nPg0KICAgCjxib2R5PtCf0YDQuNCy0LXRgiEgRG9uJ3QgZm9yZ2V0IG1lIHRo aXMgd2Vla2VuZCE8L2JvZHk+DQoKPC9ub3RlPgo= ------=_Part_1490_1571079843.1269356078803-- From andrejvanderzee@gmail.com Fri Mar 26 10:47:19 2010 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nv74R-0002ef-Ii for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 10:47:19 +0000 Received-SPF: pass (sfi-mx-1.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.222.194 as permitted sender) client-ip=209.85.222.194; envelope-from=andrejvanderzee@gmail.com; helo=mail-pz0-f194.google.com; Received: from mail-pz0-f194.google.com ([209.85.222.194]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nv74Q-0000au-KX for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 10:47:19 +0000 Received: by pzk32 with SMTP id 32so2501034pzk.4 for ; Fri, 26 Mar 2010 03:47:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.26.9 with HTTP; Fri, 26 Mar 2010 03:47:12 -0700 (PDT) Date: Fri, 26 Mar 2010 19:47:12 +0900 Received: by 10.140.83.40 with SMTP id g40mr638754rvb.223.1269600432970; Fri, 26 Mar 2010 03:47:12 -0700 (PDT) Message-ID: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> From: Andrej van der Zee To: libxmlplusplus-general@lists.sourceforge.net Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -1.0 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.5 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nv74Q-0000au-KX Subject: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 10:47:19 -0000 Hi, I am a happy user of libxmlpp for some time now. One thing I could not find out yet. How can I ignore empty text nodes? The problem is that I construct a dom document by reading two XML files and merging them together with import_node(). I also remove some nodes manually with remove_child(). Finally I do a doc->write_to_stream_formatted(cout, "UTF-8") and end up with ugly output with holes in them like this: I understand that these are empty text-nodes, but I wish to ignore them. How can I do that without writing my own version of write_to_stream_formatted()? I just wish to ignore them altogether. Thank you, Andrej From murrayc@murrayc.com Fri Mar 26 10:52:12 2010 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nv79A-000496-OV for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 10:52:12 +0000 X-ACL-Warn: Received: from hapkido.dreamhost.com ([66.33.216.122]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nv799-0005yI-L4 for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 10:52:12 +0000 Received: from homiemail-a3.g.dreamhost.com (caiajhbdccac.dreamhost.com [208.97.132.202]) by hapkido.dreamhost.com (Postfix) with ESMTP id 0A34A179022 for ; Fri, 26 Mar 2010 03:52:05 -0700 (PDT) Received: from [192.168.24.44] (dslb-084-056-013-163.pools.arcor-ip.net [84.56.13.163]) by homiemail-a3.g.dreamhost.com (Postfix) with ESMTP id 03BC3C5DB3; Fri, 26 Mar 2010 03:51:59 -0700 (PDT) From: Murray Cumming To: Andrej van der Zee In-Reply-To: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 26 Mar 2010 11:51:57 +0100 Message-ID: <1269600717.3398.10.camel@murrayc-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1Nv799-0005yI-L4 Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 10:52:12 -0000 On Fri, 2010-03-26 at 19:47 +0900, Andrej van der Zee wrote: > Hi, > > I am a happy user of libxmlpp for some time now. One thing I could not > find out yet. How can I ignore empty text nodes? By checking for them in your application when you read the XML document. It's entirely up to your application to decide whether white space is interesting. > The problem is that I > construct a dom document by reading two XML files and merging them > together with import_node(). I also remove some nodes manually with > remove_child(). Finally I do a doc->write_to_stream_formatted(cout, > "UTF-8") and end up with ugly output with holes in them like this: > > > projectName="GBV" phase="1" iteration="1" sessionName="M2 - AUTO > TEST3"> > > smtEnabled="0" numCpus="666" opsys="ToBeOverwittenByParser" > hardware="ToBeOverWrittenByParser" > serviceLevel="ToBeOverwittenByParser" cpuSpeed="1" > cpuSpeedBenchmark="MIPS" cacheHitPerc="95" cacheHitTime="0.0015" > cacheMissTime="0.005" monitoringTool="ascb" timeDiff="67"/> > > > > > > > > > ignoreEteValidator="0"> filename="SU1/20100304-GBV-M2-SU1.ete"/> filename="SU1/20100304-GBV-M2-SU1.mf" > hostname="apmvsq1"/> > > > I understand that these are empty text-nodes, but I wish to ignore > them. How can I do that without writing my own version of > write_to_stream_formatted()? I just wish to ignore them altogether. > > Thank you, > Andrej > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Libxmlplusplus-general mailing list > Libxmlplusplus-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libxmlplusplus-general -- murrayc@murrayc.com www.murrayc.com www.openismus.com From andrejvanderzee@gmail.com Fri Mar 26 10:57:12 2010 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nv7E0-0006C6-JF for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 10:57:12 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.160.47 as permitted sender) client-ip=209.85.160.47; envelope-from=andrejvanderzee@gmail.com; helo=mail-pw0-f47.google.com; Received: from mail-pw0-f47.google.com ([209.85.160.47]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nv7Dz-0006hJ-Mn for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 10:57:12 +0000 Received: by pwj5 with SMTP id 5so1220170pwj.34 for ; Fri, 26 Mar 2010 03:57:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.26.9 with HTTP; Fri, 26 Mar 2010 03:57:05 -0700 (PDT) In-Reply-To: <1269600717.3398.10.camel@murrayc-desktop> References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> <1269600717.3398.10.camel@murrayc-desktop> Date: Fri, 26 Mar 2010 19:57:05 +0900 Received: by 10.141.91.7 with SMTP id t7mr706102rvl.83.1269601025951; Fri, 26 Mar 2010 03:57:05 -0700 (PDT) Message-ID: <6456355d1003260357n58dcfe4cjb5d1b9b57b9f54da@mail.gmail.com> From: Andrej van der Zee To: Murray Cumming Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -1.1 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nv7Dz-0006hJ-Mn Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 10:57:12 -0000 Hi Murray Cumming, Thank you for your reply. > > By checking for them in your application when you read the XML document. > It's entirely up to your application to decide whether white space is > interesting. > How can I "check for them"? I am parsing a file like this: DomParser session_parser; session_parser.set_substitute_entities(); session_parser.parse_file("session-cfg.xml"); Document * doc_session = session_parser.get_document(); Do you mean manually traverse doc_session and remove them with remove_child? I was hoping that there was an option that I could use to instruct the parser. I am sure that empty text nodes in many cases should be ignored, so I expect to be able to do such a thing without to much manual coding. Cheers, Andrej From murrayc@murrayc.com Fri Mar 26 11:03:16 2010 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nv7Js-0006dF-Ba for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 11:03:16 +0000 X-ACL-Warn: Received: from hapkido.dreamhost.com ([66.33.216.122]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nv7Jr-0000pY-2T for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 11:03:16 +0000 Received: from homiemail-a5.g.dreamhost.com (caiajhbdcbbj.dreamhost.com [208.97.132.119]) by hapkido.dreamhost.com (Postfix) with ESMTP id 94B97178466 for ; Fri, 26 Mar 2010 04:03:02 -0700 (PDT) Received: from [192.168.24.44] (dslb-084-056-013-163.pools.arcor-ip.net [84.56.13.163]) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTP id CCF2ABCC32; Fri, 26 Mar 2010 04:02:55 -0700 (PDT) From: Murray Cumming To: Andrej van der Zee In-Reply-To: <6456355d1003260357n58dcfe4cjb5d1b9b57b9f54da@mail.gmail.com> References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> <1269600717.3398.10.camel@murrayc-desktop> <6456355d1003260357n58dcfe4cjb5d1b9b57b9f54da@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 26 Mar 2010 12:02:53 +0100 Message-ID: <1269601373.3398.13.camel@murrayc-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1Nv7Jr-0000pY-2T Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 11:03:16 -0000 On Fri, 2010-03-26 at 19:57 +0900, Andrej van der Zee wrote: > Hi Murray Cumming, > > Thank you for your reply. > > > > > By checking for them in your application when you read the XML document. > > It's entirely up to your application to decide whether white space is > > interesting. > > > > How can I "check for them"? I am parsing a file like this: > > DomParser session_parser; > session_parser.set_substitute_entities(); > session_parser.parse_file("session-cfg.xml"); > Document * doc_session = session_parser.get_document(); > > Do you mean manually traverse doc_session and remove them with > remove_child? Yes. I guess you are doing that somehow anyway during your "merge" of two documents. > I was hoping that there was an option that I could use > to instruct the parser. I am sure that empty text nodes in many cases > should be ignored, so I expect to be able to do such a thing without > to much manual coding. I guess I'd accept a patch that adds an Element::remove_empty_text_nodes() method. The you could call that on get_root_node(). -- murrayc@murrayc.com www.murrayc.com www.openismus.com From andrejvanderzee@gmail.com Fri Mar 26 11:07:15 2010 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nv7Nj-00062t-SB for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 11:07:15 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.216.203 as permitted sender) client-ip=209.85.216.203; envelope-from=andrejvanderzee@gmail.com; helo=mail-px0-f203.google.com; Received: from mail-px0-f203.google.com ([209.85.216.203]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nv7Nd-0000JA-Oc for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 11:07:15 +0000 Received: by pxi41 with SMTP id 41so1345548pxi.23 for ; Fri, 26 Mar 2010 04:07:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.26.9 with HTTP; Fri, 26 Mar 2010 04:07:04 -0700 (PDT) In-Reply-To: <1269601373.3398.13.camel@murrayc-desktop> References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> <1269600717.3398.10.camel@murrayc-desktop> <6456355d1003260357n58dcfe4cjb5d1b9b57b9f54da@mail.gmail.com> <1269601373.3398.13.camel@murrayc-desktop> Date: Fri, 26 Mar 2010 20:07:04 +0900 Received: by 10.141.88.6 with SMTP id q6mr717201rvl.91.1269601624164; Fri, 26 Mar 2010 04:07:04 -0700 (PDT) Message-ID: <6456355d1003260407p35e0d9afjba4ef7dbc6b364bc@mail.gmail.com> From: Andrej van der Zee To: Murray Cumming Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -1.2 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nv7Nd-0000JA-Oc Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 11:07:15 -0000 Hi, > > Yes. I guess you are doing that somehow anyway during your "merge" of > two documents. Actually I am using import_node(). > I guess I'd accept a patch that adds an > Element::remove_empty_text_nodes() method. The you could call that on > get_root_node(). I will have a look when I have time. Though, I am doubting the correctness of the "doc->write_to_stream_formatted()" method now. I expect the output to be formatted, but if you look at the last few nodes, they are not formatted at all. See below. Am I misunderstanding something? Thank you, Andrej -------------- output of write_to_stream_formatted(), is it really formatted? ---------------- From murrayc@murrayc.com Fri Mar 26 11:12:06 2010 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nv7SQ-00063o-7N for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 11:12:06 +0000 X-ACL-Warn: Received: from caiajhbdcagg.dreamhost.com ([208.97.132.66] helo=homiemail-a3.g.dreamhost.com) by sfi-mx-2.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nv7SP-0003YB-2B for libxmlplusplus-general@lists.sourceforge.net; Fri, 26 Mar 2010 11:12:06 +0000 Received: from [192.168.24.44] (dslb-084-056-013-163.pools.arcor-ip.net [84.56.13.163]) by homiemail-a3.g.dreamhost.com (Postfix) with ESMTP id D7079C5D79; Fri, 26 Mar 2010 04:11:58 -0700 (PDT) From: Murray Cumming To: Andrej van der Zee In-Reply-To: <6456355d1003260407p35e0d9afjba4ef7dbc6b364bc@mail.gmail.com> References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> <1269600717.3398.10.camel@murrayc-desktop> <6456355d1003260357n58dcfe4cjb5d1b9b57b9f54da@mail.gmail.com> <1269601373.3398.13.camel@murrayc-desktop> <6456355d1003260407p35e0d9afjba4ef7dbc6b364bc@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 26 Mar 2010 12:11:57 +0100 Message-ID: <1269601917.3398.17.camel@murrayc-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1Nv7SP-0003YB-2B Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 11:12:06 -0000 On Fri, 2010-03-26 at 20:07 +0900, Andrej van der Zee wrote: > Though, I am doubting the correctness of the > "doc->write_to_stream_formatted()" method now. I expect the output to > be formatted, but if you look at the last few nodes, they are not > formatted at all. See below. Am I misunderstanding something? I stopped using it in Bakery (now in Glom) too. I think it just gives up when it finds child text nodes, because it can't generically know if they should be indented with white space. I did this: http://git.gnome.org/browse/bakery/commit/?id=54d85442f58228609a147f461934b75387fa8d7d -- murrayc@murrayc.com www.murrayc.com www.openismus.com From knutroy@ifi.uio.no Sat Mar 27 15:19:54 2010 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NvXnm-0003bF-31 for libxmlplusplus-general@lists.sourceforge.net; Sat, 27 Mar 2010 15:19:54 +0000 Received: from mail-out2.uio.no ([129.240.10.58]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NvXnj-0007Gy-K7 for libxmlplusplus-general@lists.sourceforge.net; Sat, 27 Mar 2010 15:19:53 +0000 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out2.uio.no with esmtp (Exim 4.69) (envelope-from ) id 1NvXnd-0008ST-3f; Sat, 27 Mar 2010 16:19:45 +0100 Received: from cm-84.215.51.116.getinternet.no ([84.215.51.116] helo=[192.168.1.126]) by mail-mx2.uio.no with esmtpsa (TLSv1:AES256-SHA:256) user knutroy (Exim 4.69) (envelope-from ) id 1NvXnc-0003Td-On; Sat, 27 Mar 2010 16:19:45 +0100 Message-ID: <4BAE2210.7090203@ifi.uio.no> Date: Sat, 27 Mar 2010 16:19:44 +0100 From: =?ISO-8859-1?Q?Knut_Aksel_R=F8ysland?= User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Andrej van der Zee References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> In-Reply-To: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-UiO-Ratelimit-Test: rcpts/h 3 msgs/h 1 sum rcpts/h 4 sum msgs/h 1 total rcpts 230 max rcpts/h 10 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: F050ACED0A9340E481EE1F143D2DDCD738979664 X-UiO-SPAM-Test: remote_host: 84.215.51.116 spam_score: -49 maxlevel 80 minaction 1 bait 0 mail/h: 1 total 26 max/h 2 blacklist 0 greylist 0 ratelimit 0 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1NvXnj-0007Gy-K7 Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2010 15:19:54 -0000 * Andrej van der Zee > I am a happy user of libxmlpp for some time now. One thing I could not > find out yet. How can I ignore empty text nodes? [...] Hi. I have used the following XPath-based technique to remove such nodes in order to "normalize" XML-documents that are stored in pretty-printed format. The reason I had them stored pretty-printed, was to improve readability in a test suite. I would not use pretty-printing on XML that is going directly between machines. void remove_whitespace_nodes(xmlpp::Document & doc) { xmlpp::NodeSet whitespace_nodes = doc.get_root_node()->find("//text()[normalize-space()='']"); for (xmlpp::NodeSet::const_iterator it = whitespace_nodes.begin(); it != whitespace_nodes.end(); ++it) { (*it)->get_parent()->remove_child(*it); } } Make sure the XPath above does not identify nodes that carries meaning to your application, otherwise you would have to refine it somehow. -- Sincerely, Knut Aksel Røysland From andrejvanderzee@gmail.com Sun Mar 28 01:46:38 2010 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NvhaI-0000GL-SF for libxmlplusplus-general@lists.sourceforge.net; Sun, 28 Mar 2010 01:46:38 +0000 Received-SPF: pass (sfi-mx-1.v28.ch3.sourceforge.com: domain of gmail.com designates 74.125.83.175 as permitted sender) client-ip=74.125.83.175; envelope-from=andrejvanderzee@gmail.com; helo=mail-pv0-f175.google.com; Received: from mail-pv0-f175.google.com ([74.125.83.175]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NvhaH-0000SY-9I for libxmlplusplus-general@lists.sourceforge.net; Sun, 28 Mar 2010 01:46:38 +0000 Received: by pvc30 with SMTP id 30so153714pvc.34 for ; Sat, 27 Mar 2010 18:46:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.26.9 with HTTP; Sat, 27 Mar 2010 18:46:31 -0700 (PDT) In-Reply-To: <4BAE2210.7090203@ifi.uio.no> References: <6456355d1003260347m31ac7a1as94b5b94f23e2dd8d@mail.gmail.com> <4BAE2210.7090203@ifi.uio.no> Date: Sun, 28 Mar 2010 10:46:31 +0900 Received: by 10.141.90.21 with SMTP id s21mr2631711rvl.240.1269740791566; Sat, 27 Mar 2010 18:46:31 -0700 (PDT) Message-ID: <6456355d1003271846t3ac9e351k8284f1282037f811@mail.gmail.com> From: Andrej van der Zee To: =?ISO-8859-1?Q?Knut_Aksel_R=F8ysland?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature X-Headers-End: 1NvhaH-0000SY-9I Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] ignore empty text nodes X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2010 01:46:38 -0000 Hi, > > void remove_whitespace_nodes(xmlpp::Document & doc) > { > =A0 =A0xmlpp::NodeSet whitespace_nodes =3D > doc.get_root_node()->find("//text()[normalize-space()=3D'']"); > =A0 =A0for (xmlpp::NodeSet::const_iterator it =3D whitespace_nodes.begin(= ); > =A0 =A0 =A0 =A0 it !=3D whitespace_nodes.end(); > =A0 =A0 =A0 =A0 ++it) > =A0 =A0{ > =A0 =A0 =A0 =A0(*it)->get_parent()->remove_child(*it); > =A0 =A0} > } > Thank you, that's a nice one! Greets, Andrej From murrayc@murrayc.com Tue Mar 30 16:08:39 2010 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nwdzb-000478-Li for libxmlplusplus-general@lists.sourceforge.net; Tue, 30 Mar 2010 16:08:39 +0000 X-ACL-Warn: Received: from caiajhbdcbef.dreamhost.com ([208.97.132.145] helo=homiemail-a7.g.dreamhost.com) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NwdzZ-0006fP-Uy for libxmlplusplus-general@lists.sourceforge.net; Tue, 30 Mar 2010 16:08:39 +0000 Received: from [192.168.24.44] (dslb-084-056-032-075.pools.arcor-ip.net [84.56.32.75]) by homiemail-a7.g.dreamhost.com (Postfix) with ESMTPA id 9558225C069; Tue, 30 Mar 2010 09:08:31 -0700 (PDT) From: Murray Cumming To: Nic.Reveles@gatech.edu In-Reply-To: <1169375458.61451269356078809.JavaMail.root@mail5.gatech.edu> References: <1169375458.61451269356078809.JavaMail.root@mail5.gatech.edu> Content-Type: text/plain; charset="UTF-8" Date: Tue, 30 Mar 2010 18:08:31 +0200 Message-ID: <1269965311.2951.128.camel@murrayc-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1NwdzZ-0006fP-Uy Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Glib::ConvertError' X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 16:08:39 -0000 On Tue, 2010-03-23 at 10:54 -0400, Nic.Reveles@gatech.edu wrote: > > It crashes with 'Glib::ConvertError'. Removing the UTF-8 characters fixes the problem, but obviously that's not a great solution. Also, if I do not attempt to 'cout' the field with UTF-8 characters, it also does not crash, but I need to output the field. Yes, this was a problem with the use of std::cout in the examples, not with the actual libxml++ implementation. You are not the first to notice it and it has bothered me for a while. I have committed a fix now that I've finally figured it out after talking to Daniel Elstner: http://git.gnome.org/browse/libxml ++/commit/?id=6f91e4489fba79f70c33029d2d9a76fd03fe6276 It adds this code to the main() of all the examples: std::locale::global(std::locale("")); -- murrayc@murrayc.com www.murrayc.com www.openismus.com From Nic.Reveles@gatech.edu Tue Mar 30 20:36:20 2010 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NwiAe-0003WI-Nq for libxmlplusplus-general@lists.sourceforge.net; Tue, 30 Mar 2010 20:36:20 +0000 X-ACL-Warn: Received: from deliverator1.gatech.edu ([130.207.165.161]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NwiAd-0001SP-Na for libxmlplusplus-general@lists.sourceforge.net; Tue, 30 Mar 2010 20:36:20 +0000 Received: from deliverator1.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 7A8C72DDDDE; Tue, 30 Mar 2010 16:36:12 -0400 (EDT) Received: from mail5.gatech.edu (mail5.gatech.edu [130.207.185.165]) by deliverator1.gatech.edu (Postfix) with ESMTP id 08AA62DE24A; Tue, 30 Mar 2010 16:36:11 -0400 (EDT) Received: from mail5.gatech.edu (localhost [127.0.0.1]) by mail5.gatech.edu (Postfix) with ESMTP id EAAB41FFA1; Tue, 30 Mar 2010 16:36:10 -0400 (EDT) Date: Tue, 30 Mar 2010 16:36:10 -0400 (EDT) From: Nic.Reveles@gatech.edu Sender: Nic.Reveles@gatech.edu To: Murray Cumming Message-ID: <1816501322.213961269981370866.JavaMail.root@mail5.gatech.edu> In-Reply-To: <274179935.212461269981063007.JavaMail.root@mail5.gatech.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [130.207.185.220] X-Mailer: Zimbra 5.0.22_GA_3210.RHEL5_64 (ZimbraWebClient - FF3.0 (Linux)/5.0.22_GA_3210.RHEL5_64) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1NwiAd-0001SP-Na Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Glib::ConvertError' X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:36:20 -0000 Thank you for looking into this! I've added this line to the top of my main, but still have a crash: terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Abort trap: 6 (core dumped) My 'locale' command shows that I am using en_US.UTF-8, which is also listed in `locale -a`. $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_ALL= If I export LANG=C, I return to the original error: terminate called after throwing an instance of 'Glib::ConvertError'. Is this a problem with freeBSD 8.0 or the example code? Again, thank you for your help. Nic From murrayc@murrayc.com Tue Mar 30 20:52:09 2010 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NwiPx-0005Ip-6G for libxmlplusplus-general@lists.sourceforge.net; Tue, 30 Mar 2010 20:52:09 +0000 X-ACL-Warn: Received: from mailbigip.dreamhost.com ([208.97.132.5] helo=homiemail-a14.g.dreamhost.com) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NwiPw-0005v5-1I for libxmlplusplus-general@lists.sourceforge.net; Tue, 30 Mar 2010 20:52:09 +0000 Received: from [192.168.178.20] (host-88-217-185-158.customer.m-online.net [88.217.185.158]) by homiemail-a14.g.dreamhost.com (Postfix) with ESMTPA id 585D78C07D; Tue, 30 Mar 2010 13:52:01 -0700 (PDT) From: Murray Cumming To: Nic.Reveles@gatech.edu In-Reply-To: <1816501322.213961269981370866.JavaMail.root@mail5.gatech.edu> References: <1816501322.213961269981370866.JavaMail.root@mail5.gatech.edu> Content-Type: text/plain; charset="UTF-8" Date: Tue, 30 Mar 2010 22:51:58 +0200 Message-ID: <1269982318.3674.7.camel@murrayc-x61> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.1 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NwiPw-0005v5-1I Cc: libxmlplusplus-general@lists.sourceforge.net Subject: Re: [libxml++] Also Have Problems with UTF-8 in Example Code: 'Glib::ConvertError' X-BeenThere: libxmlplusplus-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 20:52:09 -0000 On Tue, 2010-03-30 at 16:36 -0400, Nic.Reveles@gatech.edu wrote: > Is this a problem with freeBSD 8.0 or the example code? Again, thank > you for your help. Maybe, yes, someone on the gtkmm-list just said: " I remember having some problems with std::locale::global(std::locale("")); under FreeBSD 6.x. Basically, it just abort()ed with: "locale::facet::_S_create_c_locale name not valid". Something to do with libstdc++/libc incompatibility. Googling around hints that this issue may affect Darwin (OS X) too. " http://mail.gnome.org/archives/gtkmm-list/2010-March/msg00161.html I'm afraid you'll have to investigate that yourselves because I am not using FreeBSD, though if you are lucky then someone will mention a solution in that gtkmm-list thread. -- murrayc@murrayc.com www.murrayc.com www.openismus.com