This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XML and X-expressions


Hi all,

I?ve just begun working with Kawa and I find the Java integration very
cool. [I even impressed a Java-addicted colleague of mine!]

First, some background. I plan to build a number of tools for
manipulating and converting XML in Scheme. For instance, I want to
implement a transformation language (à la XSLT, but with better support
for pattern matching ? I don?t really like the syntax of SXSLT) as a
Scheme macro, and also a number of XPath-like combinators for query XML
trees.

To do this, I need to traverse XML documents in Scheme and match
patterns against the XML elements. Suppose I read an XML file with
parse-xml-from-url. The result is an XML tree as if created with
make-element and make-attributes. Given such a tree, how do I extract
the element tag name? the value of a specific attribute? The child
elements? Do I have to define classes implementing the Consumer
interface in order to do that?

Thanks in advance,

Dominique Boucher
www.nuecho.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]