From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4c3a4cac2a77bb10 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news2.google.com!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: XMLAda dom document to string Date: Wed, 13 Apr 2005 19:03:34 +0200 Organization: Cuivre, Argent, Or Message-ID: References: <425CC45E.20404@mailinator.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1113411844 79153 212.85.156.195 (13 Apr 2005 17:04:04 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Wed, 13 Apr 2005 17:04:04 +0000 (UTC) Cc: comp.lang.ada@ada-france.org To: "Alex R. Mosteo" Return-Path: In-Reply-To: <425CC45E.20404@mailinator.com> X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at spray.net X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:10429 Date: 2005-04-13T19:03:34+02:00 2005-04-13 kl. 09.03 skrev Alex R. Mosteo: > Bj=F6rn Lundin wrote: >> Hello! >> Is there a way of converting a dom document from >> XML/Ada (1.0) to a string? >> I found a Print in DOM.Core.Nodes that prints out a document to std =20= >> out. >> That is actually what I want, but to a string instead, that I can put = =20 >> through a socket later on. >> I'm sure I've missed something obvious, but I can't see through it. >> I've also found on a wiki, a way of walking the nodes in a document., = =20 >> by David Button, >> I've been thinking of using it, as a template for a new =20 >> procedure/function that does what I want, >> but I thought I'd ask here first, before I invent the wheel again. > > AFAIK, this is not present in that release of XML/Ada. I modified the =20= > Print function to get a string. You can look at it at > > http://deepsix.homeip.net/svn/Adagio%20head/src/agpl/dom-core-nodes-=20= > output.ads > http://deepsix.homeip.net/svn/Adagio%20head/src/agpl/dom-core-nodes-=20= > output.adb Great, just what I was after :) Curiosity : what are you escaping? Agpl.Xml.Escape is found in the body, which I removed. > but be warned that it performs some pretty printing and by that reason = =20 > Windows-style new lines are embedded in the resulting string. I can live with that. > I'm sure I've talked about this with other people in some mailing =20 > list, so no doubt there are alternate solutions out there. It's =20 > possible that CVS XML/Ada has it already. No, not a week ago anyway. I did download it then, but did not find =20 anything helpfull at all. However I think this qualify for inclusion, except for the with'ed agpl =20= package Thanks a lot /Bj=F6rn Bj=F6rn Lundin bnl at spray dot se