Skip to content

Instantly share code, notes, and snippets.

@takezoe
Created January 1, 2012 07:37
Show Gist options
  • Save takezoe/1546629 to your computer and use it in GitHub Desktop.
Save takezoe/1546629 to your computer and use it in GitHub Desktop.
[scalaxb]How are repeated child elements mapped to case classes?
case class Person(personsequence1: jp.sf.amateras.scala.util.xsd.PersonSequence1*)
case class PersonSequence1(lang: jp.sf.amateras.scala.util.xsd.Lang)
case class Lang(value: String)
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/sample"
xmlns:tns="http://www.example.org/sample" elementFormDefault="qualified">
<complexType name="person">
<sequence maxOccurs="unbounded" minOccurs="0">
<element name="lang" type="tns:lang"></element>
</sequence>
</complexType>
<complexType name="lang">
<simpleContent>
<extension base="string"></extension>
</simpleContent>
</complexType>
</schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment