From: <gm...@av...> - 2001-09-05 21:05:27
|
Easy! rtos[1]> (cllib:xmln-ln (cllib:xmlo-name foo)) "backslash" rtos[2]> (type-of (cllib:xmln-ln (cllib:xmlo-name foo))) (SIMPLE-ARRAY CHARACTER (10)) rtos[3]> (string= (cllib:xmln-ln (cllib:xmlo-name foo)) "backslash") T rtos[4]> Enjoy! Gregg Lobdell > From: Dave Pearson <da...@da...> > Mail-Followup-To: clo...@li... > Mime-Version: 1.0 > Content-Disposition: inline > User-Agent: Mutt/1.2.5i > Organization: (davep 'org) > X-URL: http://www.davep.org/ > X-DDate: Pungenday, Day 29 of the season of Bureaucracy, Anno Mung 3167 > Sender: clo...@li... > Errors-To: clo...@li... > X-BeenThere: clo...@li... > X-Mailman-Version: 2.0.5 > Precedence: bulk > List-Help: <mailto:clo...@li...?subject=help> > List-Post: <mailto:clo...@li...> > List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/clocc-list>, > <mailto:clo...@li...?subject=subscribe> > List-Id: <clocc-list.lists.sourceforge.net> > List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/clocc-list>, > <mailto:clo...@li...?subject=unsubscribe> > List-Archive: <https://lists.sourceforge.net/archives//clocc-list/> > X-Original-Date: Wed, 5 Sep 2001 21:06:26 +0100 > Date: Wed, 5 Sep 2001 21:06:26 +0100 > Content-Type: text/plain; charset=us-ascii > Content-Length: 1252 > > What is the correct method of getting the name of an xml-obj as a string? > > The reason I ask is that I've got an xml-obj and I can see how to get it's > name: > > ,---- > | #<cllib:xml-obj backslash [] 21 objects 1,639/2,144 chars #x204E4F69> > | slashdot[497]> (cllib:xmlo-name foo) > | "backslash" > `---- > > but, due to the type: > > ,---- > | slashdot[498]> (type-of (cllib:xmlo-name foo)) > | cllib:xml-name > `---- > > I can't compare it with a string: > > ,---- > | slashdot[499]> (string= (cllib:xmlo-name foo) "backslash") > | > | *** - string=: argument "backslash" should be a string, a symbol or a character > `---- > > Currently I'm doing things like: > > ,---- > | slashdot[501]> (string= (format nil "~A" (cllib:xmlo-name foo)) "backslash") > | t > `---- > > but that feels inelegant. Is there something in xml.lisp that gets me get > the name as a string or is the a common CL idiom I should be using to > convert a xmlo-name into a string? > > Alternatively, should I be creating another xmlo-name and comparing what > I've got with that? How would I go about doing that if that was the answer? > > -- > Dave Pearson > http://www.davep.org/ > > _______________________________________________ > clocc-list mailing list > clo...@li... > https://lists.sourceforge.net/lists/listinfo/clocc-list > |