- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
scalaxb: an XML data-binding tool for Scala
Hi all,
I'd like to sheepishly announce scalaxb, an XML data-binding tool for Scala that supports W3C XML Schema.The development is still at humble stage, but it could use some feedback.
The idea is to generate case classes from XSD files, to handle XML documents more naturally in Scala.For example,
<xs:complexType name="Address"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="street" type="xs:string"/> <xs:element name="city" type="xs:string"/> </xs:sequence> </xs:complexType>
turns to case class Address(name: String, street: String, city: String) extends DataModel with Addressable { } object Address { def fromXML(node: scala.xml.Node): Address = Address((node \ "name").text, (node \ "street").text, (node \ "city").text) }
Further information is available at http://scalaxb.org. GitHub repo is at http://github.com/eed3si9n/scalaxb.
Thanks,e.e
I'd like to sheepishly announce scalaxb, an XML data-binding tool for Scala that supports W3C XML Schema.The development is still at humble stage, but it could use some feedback.
The idea is to generate case classes from XSD files, to handle XML documents more naturally in Scala.For example,
<xs:complexType name="Address"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="street" type="xs:string"/> <xs:element name="city" type="xs:string"/> </xs:sequence> </xs:complexType>
turns to case class Address(name: String, street: String, city: String) extends DataModel with Addressable { } object Address { def fromXML(node: scala.xml.Node): Address = Address((node \ "name").text, (node \ "street").text, (node \ "city").text) }
Further information is available at http://scalaxb.org. GitHub repo is at http://github.com/eed3si9n/scalaxb.
Thanks,e.e










Re: scalaxb: an XML data-binding tool for Scala
On 3/17/2010 9:26 PM, e.e wrote:
> I'd like to sheepishly announce scalaxb, an XML data-binding tool for
> Scala that supports W3C XML Schema.
> The development is still at humble stage, but it could use some feedback.
>
> The idea is to generate case classes from XSD files, to handle XML
> documents more naturally in Scala.
This looks like a great start, e.e. I notice you're using the SAML
assertion schema as one of your test cases; the sight of it makes my
battle scars pulsate (I used to work at http://www.layer7tech.com/). :)
-0xe1a
Re: scalaxb: an XML data-binding tool for Scala
e.e
On Thu, Mar 18, 2010 at 12:43 AM, Alex Cruise <alex [at] cluonflux [dot] com> wrote: