This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Issue with JaxB-annotated trait in Scala 2.9.1

4 replies
rlvoyer
Joined: 2011-09-15,
User offline. Last seen 1 year 4 weeks ago.

Hello,

My team is attempting to move to Scala 2.9.1 from 2.8.1 and we're running into the following issue. We use JAXB for XML marshalling/unmarshalling. (Are there any more Scala-friendly alternatives?) The issue is that we have some base trait (call it BaseClass) which gets mixed-in by another class (call it SubClass). They are defined like so (along w/ two nested types, Foo and Bar):

package com.wordnik.persistence.config

import scala.collection.JavaConversions._
import javax.xml.bind.annotation.{XmlRootElement, XmlElement, XmlElementWrapper}
import scala.collection.JavaConversions._

@XmlRootElement(name = "foo")
class Foo {
var k: String = ""
var v: Int = _

def getK(): String = k

def setK(k: String) =
this.k = k

def getV(): Int = v

def setV(v: Int) =
this.v = v
}

@XmlRootElement(name = "bar")
class Bar {
var k: String = ""
var v: Int = _

def getK(): String = k

def setK(k: String) =
this.k = k

def getV(): Int = v

def setV(v: Int) =
this.v = v
}

@XmlRootElement(name = "baseClass")
trait BaseClass {
var foos: java.util.List[Foo] = new java.util.ArrayList[Foo]()

@XmlElementWrapper(name = "foos")
@XmlElement(name = "foo")
def getFoos(): java.util.List[Foo] = foos

def setMyFoos(foos: java.util.List[Foo]): Unit =
this.foos = foos
}

@XmlRootElement(name = "subClass")
class SubClass extends BaseClass {
var bars: java.util.List[Bar] = new java.util.ArrayList[Bar]()

@XmlElementWrapper(name = "bars")
@XmlElement(name = "bar")
def getSubClassBars(): java.util.List[Bar] = bars

def setSubClassBars(bars: java.util.List[Bar]): Unit =
this.bars = bars
}

In Scala 2.8.1, we're able to marshal/unmarshal subclasses without any trouble (as evidenced by the Scala REPL transcript included below), but in Scala 2.9.1, the member defined in the trait does not get populated correctly. Has anyone else come across this issue? Frankly, it would be great if we could move away from JAXB altogether, given that it doesn't seem to play very well with Scala (case classes, immutable fields, etc.) and makes our Scala code much more verbose. Are there any good alternatives?

Any insight is greatly appreciated.

Thanks,
Robert

scala> import com.wordnik.persistence.config._
scala> import java.io.FileReader
scala> import javax.xml.bind.{Marshaller, Unmarshaller, JAXBContext}
scala> import scala.collection.JavaConversions._

scala> var context = JAXBContext.newInstance(classOf[SubClass])
context: javax.xml.bind.JAXBContext =
jar:file:/Users/rlvoyer/Code/wordnik/persistence/lib/jaxb-impl-2.2.2.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: 2.2.2
Classes known to this context:
[B
boolean
byte
char
com.sun.xml.bind.api.CompositeStructure
com.wordnik.persistence.config.Bar
com.wordnik.persistence.config.Foo
com.wordnik.persistence.config.SubClass
double
float
int
java.awt.Image
java.io.File
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.Class
java.lang.Double
java.lang.Float
java.lang.Integer
java.lang.Long
java.lang.Object
java.lang.Short
java.lang.String
java.lang.Void
java.math.BigDecimal
java.math.BigInteger
java.net.URI
java.net.URL
java.util.Calendar
java.util.Date
java....
scala> var marshaller: Unmarshaller = context.createUnmarshaller
marshaller: javax.xml.bind.Unmarshaller = com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl@654e3615

scala> val c = marshaller.unmarshal(new FileReader("subClassTest.xml")).asInstanceOf[SubClass]
c: com.wordnik.persistence.config.SubClass = com.wordnik.persistence.config.SubClass@3088890d

scala> c.foos.foreach(b => println((b.k, b.v)))
(Hello, world,1)
(Bar,2)
(Baz,3)

scala> c.bars.foreach(b => println((b.k, b.v)))
(Bar-bar-bar-bar-barbra-Ann,4)

## The referenced XML file (subClassTest.xml) looks like this: ##

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Hello, world
1

Bar
2

Baz
3

Bar-bar-bar-bar-barbra-Ann
4

Kris Nuttycombe
Joined: 2009-01-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Issue with JaxB-annotated trait in Scala 2.9.1
This isn't an answer to your question, but you might be insterested in the @BeanProperty annotation to help cope with the profusion of getter and setter methods.

On Thu, Sep 15, 2011 at 4:40 PM, Robert Voyer <robert [dot] voyer [at] gmail [dot] com> wrote:
Hello,

My team is attempting to move to Scala 2.9.1 from 2.8.1 and we're running into the following issue. We use JAXB for XML marshalling/unmarshalling. (Are there any more Scala-friendly alternatives?) The issue is that we have some base trait (call it BaseClass) which gets mixed-in by another class (call it SubClass). They are defined like so (along w/ two nested types, Foo and Bar):

package com.wordnik.persistence.config

import scala.collection.JavaConversions._
import javax.xml.bind.annotation.{XmlRootElement, XmlElement, XmlElementWrapper}
import scala.collection.JavaConversions._

@XmlRootElement(name = "foo")
class Foo {
   var k: String = ""
   var v: Int = _

   def getK(): String = k

   def setK(k: String) =
       this.k = k

   def getV(): Int = v

   def setV(v: Int) =
       this.v = v
}

@XmlRootElement(name = "bar")
class Bar {
   var k: String = ""
   var v: Int = _

   def getK(): String = k

   def setK(k: String) =
       this.k = k

   def getV(): Int = v

   def setV(v: Int) =
       this.v = v
}

@XmlRootElement(name = "baseClass")
trait BaseClass {
   var foos: java.util.List[Foo] = new java.util.ArrayList[Foo]()

   @XmlElementWrapper(name = "foos")
   @XmlElement(name = "foo")
   def getFoos(): java.util.List[Foo] = foos

   def setMyFoos(foos: java.util.List[Foo]): Unit =
       this.foos = foos
}

@XmlRootElement(name = "subClass")
class SubClass extends BaseClass {
   var bars: java.util.List[Bar] = new java.util.ArrayList[Bar]()

   @XmlElementWrapper(name = "bars")
   @XmlElement(name = "bar")
   def getSubClassBars(): java.util.List[Bar] = bars

   def setSubClassBars(bars: java.util.List[Bar]): Unit =
       this.bars = bars
}

In Scala 2.8.1, we're able to marshal/unmarshal subclasses without any trouble (as evidenced by the Scala REPL transcript included below), but in Scala 2.9.1, the member defined in the trait does not get populated correctly. Has anyone else come across this issue? Frankly, it would be great if we could move away from JAXB altogether, given that it doesn't seem to play very well with Scala (case classes, immutable fields, etc.) and makes our Scala code much more verbose. Are there any good alternatives?

Any insight is greatly appreciated.

Thanks,
Robert

scala> import com.wordnik.persistence.config._
scala> import java.io.FileReader
scala> import javax.xml.bind.{Marshaller, Unmarshaller, JAXBContext}
scala> import scala.collection.JavaConversions._

scala> var context = JAXBContext.newInstance(classOf[SubClass])
context: javax.xml.bind.JAXBContext =
jar:file:/Users/rlvoyer/Code/wordnik/persistence/lib/jaxb-impl-2.2.2.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: 2.2.2
Classes known to this context:
 [B
 boolean
 byte
 char
 com.sun.xml.bind.api.CompositeStructure
 com.wordnik.persistence.config.Bar
 com.wordnik.persistence.config.Foo
 com.wordnik.persistence.config.SubClass
 double
 float
 int
 java.awt.Image
 java.io.File
 java.lang.Boolean
 java.lang.Byte
 java.lang.Character
 java.lang.Class
 java.lang.Double
 java.lang.Float
 java.lang.Integer
 java.lang.Long
 java.lang.Object
 java.lang.Short
 java.lang.String
 java.lang.Void
 java.math.BigDecimal
 java.math.BigInteger
 java.net.URI
 java.net.URL
 java.util.Calendar
 java.util.Date
 java....
scala> var marshaller: Unmarshaller = context.createUnmarshaller
marshaller: javax.xml.bind.Unmarshaller = com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl@654e3615

scala> val c = marshaller.unmarshal(new FileReader("subClassTest.xml")).asInstanceOf[SubClass]
c: com.wordnik.persistence.config.SubClass = com.wordnik.persistence.config.SubClass@3088890d

scala> c.foos.foreach(b => println((b.k, b.v)))
(Hello, world,1)
(Bar,2)
(Baz,3)

scala> c.bars.foreach(b => println((b.k, b.v)))
(Bar-bar-bar-bar-barbra-Ann,4)

## The referenced XML file (subClassTest.xml) looks like this: ##

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subClass>
   <foos>
       <foo>
           <k>Hello, world</k>
           <v>1</v>
       </foo>
       <foo>
           <k>Bar</k>
           <v>2</v>
       </foo>
       <foo>
           <k>Baz</k>
           <v>3</v>
       </foo>
   </foos>
   <bars>
       <bar>
           <k>Bar-bar-bar-bar-barbra-Ann</k>
           <v>4</v>
       </bar>
   </bars>
</subClass>


rlvoyer
Joined: 2011-09-15,
User offline. Last seen 1 year 4 weeks ago.
Re: Issue with JaxB-annotated trait in Scala 2.9.1
Thanks, Kris. I had heard of the @BeanProperty annotation but never used it. That's useful.
It bears mentioning that there's a slight typo in the code snippet I provided, which is *not* the source of the unexpected behavior I'm seeing in Scala 2.9.1. Below is the updated code (which takes advantage of the @BeanProperty annotation -- although I'm unsure about how to use it in conjunction with @XmlElementWrapper and @XmlElement):
package com.wordnik.persistence.config
import scala.collection.JavaConversions._import scala.reflect.BeanPropertyimport javax.xml.bind.annotation.{XmlRootElement, XmlTransient, XmlElement, XmlElementWrapper}
@XmlRootElement(name = "foo")class Foo {    @BeanProperty    var k: String = ""
    @BeanProperty    var v: Int = _}
@XmlRootElement(name = "bar")class Bar {    @BeanProperty    var k: String = ""
    @BeanProperty    var v: Int = _    }
@XmlRootElement(name = "baseClass")trait BaseClass {    var foos: java.util.List[Foo] = new java.util.ArrayList[Foo]()
    @XmlElementWrapper(name = "foos")    @XmlElement(name = "foo")    def getFoos(): java.util.List[Foo] = foos        def setFoos(foos: java.util.List[Foo]): Unit =        this.foos = foos}
@XmlRootElement(name = "subClass")class SubClass extends BaseClass {    var bars: java.util.List[Bar] = new java.util.ArrayList[Bar]()
    @XmlElementWrapper(name = "bars")    @XmlElement(name = "bar")    def getBars(): java.util.List[Bar] = bars        def setBars(bars: java.util.List[Bar]): Unit =        this.bars = bars}

On Sep 15, 2011, at 3:45 PM, Kris Nuttycombe wrote:
This isn't an answer to your question, but you might be insterested in the @BeanProperty annotation to help cope with the profusion of getter and setter methods.

On Thu, Sep 15, 2011 at 4:40 PM, Robert Voyer <robert [dot] voyer [at] gmail [dot] com> wrote:
Hello,

My team is attempting to move to Scala 2.9.1 from 2.8.1 and we're running into the following issue. We use JAXB for XML marshalling/unmarshalling. (Are there any more Scala-friendly alternatives?) The issue is that we have some base trait (call it BaseClass) which gets mixed-in by another class (call it SubClass). They are defined like so (along w/ two nested types, Foo and Bar):

package com.wordnik.persistence.config

import scala.collection.JavaConversions._
import javax.xml.bind.annotation.{XmlRootElement, XmlElement, XmlElementWrapper}
import scala.collection.JavaConversions._

@XmlRootElement(name = "foo")
class Foo {
   var k: String = ""
   var v: Int = _

   def getK(): String = k

   def setK(k: String) =
       this.k = k

   def getV(): Int = v

   def setV(v: Int) =
       this.v = v
}

@XmlRootElement(name = "bar")
class Bar {
   var k: String = ""
   var v: Int = _

   def getK(): String = k

   def setK(k: String) =
       this.k = k

   def getV(): Int = v

   def setV(v: Int) =
       this.v = v
}

@XmlRootElement(name = "baseClass")
trait BaseClass {
   var foos: java.util.List[Foo] = new java.util.ArrayList[Foo]()

   @XmlElementWrapper(name = "foos")
   @XmlElement(name = "foo")
   def getFoos(): java.util.List[Foo] = foos

   def setMyFoos(foos: java.util.List[Foo]): Unit =
       this.foos = foos
}

@XmlRootElement(name = "subClass")
class SubClass extends BaseClass {
   var bars: java.util.List[Bar] = new java.util.ArrayList[Bar]()

   @XmlElementWrapper(name = "bars")
   @XmlElement(name = "bar")
   def getSubClassBars(): java.util.List[Bar] = bars

   def setSubClassBars(bars: java.util.List[Bar]): Unit =
       this.bars = bars
}

In Scala 2.8.1, we're able to marshal/unmarshal subclasses without any trouble (as evidenced by the Scala REPL transcript included below), but in Scala 2.9.1, the member defined in the trait does not get populated correctly. Has anyone else come across this issue? Frankly, it would be great if we could move away from JAXB altogether, given that it doesn't seem to play very well with Scala (case classes, immutable fields, etc.) and makes our Scala code much more verbose. Are there any good alternatives?

Any insight is greatly appreciated.

Thanks,
Robert

scala> import com.wordnik.persistence.config._
scala> import java.io.FileReader
scala> import javax.xml.bind.{Marshaller, Unmarshaller, JAXBContext}
scala> import scala.collection.JavaConversions._

scala> var context = JAXBContext.newInstance(classOf[SubClass])
context: javax.xml.bind.JAXBContext =
jar:file:/Users/rlvoyer/Code/wordnik/persistence/lib/jaxb-impl-2.2.2.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: 2.2.2
Classes known to this context:
 [B
 boolean
 byte
 char
 com.sun.xml.bind.api.CompositeStructure
 com.wordnik.persistence.config.Bar
 com.wordnik.persistence.config.Foo
 com.wordnik.persistence.config.SubClass
 double
 float
 int
 java.awt.Image
 java.io.File
 java.lang.Boolean
 java.lang.Byte
 java.lang.Character
 java.lang.Class
 java.lang.Double
 java.lang.Float
 java.lang.Integer
 java.lang.Long
 java.lang.Object
 java.lang.Short
 java.lang.String
 java.lang.Void
 java.math.BigDecimal
 java.math.BigInteger
 java.net.URI
 java.net.URL
 java.util.Calendar
 java.util.Date
 java....
scala> var marshaller: Unmarshaller = context.createUnmarshaller
marshaller: javax.xml.bind.Unmarshaller = com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl@654e3615

scala> val c = marshaller.unmarshal(new FileReader("subClassTest.xml")).asInstanceOf[SubClass]
c: com.wordnik.persistence.config.SubClass = com.wordnik.persistence.config.SubClass@3088890d

scala> c.foos.foreach(b => println((b.k, b.v)))
(Hello, world,1)
(Bar,2)
(Baz,3)

scala> c.bars.foreach(b => println((b.k, b.v)))
(Bar-bar-bar-bar-barbra-Ann,4)

## The referenced XML file (subClassTest.xml) looks like this: ##

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subClass>
   <foos>
       <foo>
           <k>Hello, world</k>
           <v>1</v>
       </foo>
       <foo>
           <k>Bar</k>
           <v>2</v>
       </foo>
       <foo>
           <k>Baz</k>
           <v>3</v>
       </foo>
   </foos>
   <bars>
       <bar>
           <k>Bar-bar-bar-bar-barbra-Ann</k>
           <v>4</v>
       </bar>
   </bars>
</subClass>



DaveScala
Joined: 2011-03-18,
User offline. Last seen 1 year 21 weeks ago.
Re: Issue with JaxB-annotated trait in Scala 2.9.1

I think the closest is scalaxb
http://scalaxb.org

It generates scala files from an xsd file and supports inheritance.
For the foos and the bars tags there are extra case classes. If you
don't want the extra case classes then the tags foos and bars should
also be removed from the xsd. So it is one on one.
And note that if you want to use xs:date then this is
XMLGregegorianCalendar in scala (handy to know for if you use lift-
json which uses java.util.Date)

foosbars.xsd
============

is generated
scalaxb -p com.wordnik.persistence.config foosbars.xsd
to:

foosbars.scala
==============
// Generated by scalaxb.
package com.wordnik.persistence.config

case class Foo(k: String,
v: Int)

case class Bar(k: String,
v: Int)

case class Foos(foo: com.wordnik.persistence.config.Foo*)

trait BaseClassable {
val foos: com.wordnik.persistence.config.Foos
}

case class BaseClass(foos: com.wordnik.persistence.config.Foos)
extends BaseClassable

case class Bars(bar: com.wordnik.persistence.config.Bar*)

case class SubClass(foos: com.wordnik.persistence.config.Foos,
bars: com.wordnik.persistence.config.Bars) extends BaseClassable

test.scala
==========
package com.wordnik.persistence.config

import scalaxb._

object Test extends App {

val xmlSubClass =

Hello, world
1

Bar
2

Baz
3

Bar-bar-bar-bar-barbra-Ann
4

val c = scalaxb.fromXML[SubClass](xmlSubClass) //unmarshalling from
XML
println(c)
println
implicit def foreach(foos: Foos) = for(f <- foos.foo) yield f
implicit def foreach(bars: Bars) = for(b <- bars.bar) yield b
c.foos.foreach(b => println((b.k, b.v)))
println
c.bars.foreach(b => println((b.k, b.v)))
println
val xmlSubClass2 = scalaxb.toXML[SubClass](c, None, Some("subClass"),
defaultScope) //marshalling to XML
println(xmlSubClass2)
}
/*
C:\scala-2.9.1.final\examples\scalaxb\foosbars>scalaxb -p
com.wordnik.persistence.config foosbars.xsd
generated .\foosbars.scala.
generated .\xmlprotocol.scala.
generated .\scalaxb.scala.

C:\scala-2.9.1.final\examples\scalaxb\foosbars>scalac *.scala
warning: there were 3 deprecation warnings; re-run with -deprecation
for details

one warning found

C:\scala-2.9.1.final\examples\scalaxb\foosbars>scala
com.wordnik.persistence.config.Test
SubClass(Foos(List(Foo(Hello, world,1), Foo(Bar,2), Foo(Baz,
3))),Bars(List(Bar(B
ar-bar-bar-bar-barbra-Ann,4))))

(Hello, world,1)
(Bar,2)
(Baz,3)

(Bar-bar-bar-bar-barbra-Ann,4)

Hello, world1
Bar2Baz3Bar-bar-b
ar-bar-barbra-Ann4
*/

Adam Jorgensen
Joined: 2011-04-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Issue with JaxB-annotated trait in Scala 2.9.1
Back when I worked in Java I found that XMLBeans was a lot less painful than JAXB...
No idea whether this is still the case and how well it interacts with Scala though...

On 16 September 2011 03:42, Dave <dave [dot] mahabiersing [at] hotmail [dot] com> wrote:
I think the closest is scalaxb
http://scalaxb.org

It generates scala files from an xsd file and supports inheritance.
For the foos and the bars tags there are extra case classes. If you
don't want the extra case classes then the tags foos and bars should
also be removed from the xsd. So it is one on one.
And note that if you want to use xs:date then this is
XMLGregegorianCalendar in scala (handy to know for if you use lift-
json which uses java.util.Date)

foosbars.xsd
============
<xs:schema targetNamespace="com.wordnik.persistence.config"
       elementFormDefault="qualified"
       xmlns="com.wordnik.persistence.config"
       xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:complexType name="Foo">
   <xs:sequence>
     <xs:element name="k" type="xs:string"/>
     <xs:element name="v" type="xs:int"/>
   </xs:sequence>
 </xs:complexType>

  <xs:complexType name="Bar">
   <xs:sequence>
     <xs:element name="k" type="xs:string"/>
     <xs:element name="v" type="xs:int"/>
   </xs:sequence>
 </xs:complexType>

 <xs:complexType name="baseClass">
   <xs:sequence>
      <xs:element name="foos">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="foo" type="Foo" minOccurs="0"
maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
     </xs:element>
   </xs:sequence>
 </xs:complexType>

 <xs:complexType name="subClass">
     <xs:complexContent>
        <xs:extension base="baseClass">
           <xs:sequence>
             <xs:element name="bars">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="bar" type="Bar" minOccurs="0"
maxOccurs="unbounded"/>
                  </xs:sequence>
                </xs:complexType>
             </xs:element>
           </xs:sequence>
        </xs:extension>
     </xs:complexContent>
 </xs:complexType>

</xs:schema>


is generated
scalaxb -p com.wordnik.persistence.config foosbars.xsd
to:

foosbars.scala
==============
// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
package com.wordnik.persistence.config

case class Foo(k: String,
 v: Int)


case class Bar(k: String,
 v: Int)


case class Foos(foo: com.wordnik.persistence.config.Foo*)


trait BaseClassable {
 val foos: com.wordnik.persistence.config.Foos
}


case class BaseClass(foos: com.wordnik.persistence.config.Foos)
extends BaseClassable


case class Bars(bar: com.wordnik.persistence.config.Bar*)


case class SubClass(foos: com.wordnik.persistence.config.Foos,
 bars: com.wordnik.persistence.config.Bars) extends BaseClassable

test.scala
==========
package com.wordnik.persistence.config

import scalaxb._

object Test extends App {

val xmlSubClass = <subClass xmlns="com.wordnik.persistence.config">
   <foos>
       <foo>
           <k>Hello, world</k>
           <v>1</v>
       </foo>
       <foo>
           <k>Bar</k>
           <v>2</v>
       </foo>
       <foo>
           <k>Baz</k>
           <v>3</v>
       </foo>
   </foos>
   <bars>
       <bar>
           <k>Bar-bar-bar-bar-barbra-Ann</k>
          <v>4</v>
       </bar>
   </bars>
 </subClass>


val c = scalaxb.fromXML[SubClass](xmlSubClass) //unmarshalling from
XML
println(c)
println
implicit def foreach(foos: Foos) = for(f <- foos.foo) yield f
implicit def foreach(bars: Bars) = for(b <- bars.bar) yield b
c.foos.foreach(b => println((b.k, b.v)))
println
c.bars.foreach(b => println((b.k, b.v)))
println
val xmlSubClass2 = scalaxb.toXML[SubClass](c, None, Some("subClass"),
defaultScope) //marshalling to XML
println(xmlSubClass2)
}
/*
C:\scala-2.9.1.final\examples\scalaxb\foosbars>scalaxb -p
com.wordnik.persistence.config foosbars.xsd
generated .\foosbars.scala.
generated .\xmlprotocol.scala.
generated .\scalaxb.scala.

C:\scala-2.9.1.final\examples\scalaxb\foosbars>scalac *.scala
warning: there were 3 deprecation warnings; re-run with -deprecation
for details

one warning found

C:\scala-2.9.1.final\examples\scalaxb\foosbars>scala
com.wordnik.persistence.config.Test
SubClass(Foos(List(Foo(Hello, world,1), Foo(Bar,2), Foo(Baz,
3))),Bars(List(Bar(B
ar-bar-bar-bar-barbra-Ann,4))))

(Hello, world,1)
(Bar,2)
(Baz,3)

(Bar-bar-bar-bar-barbra-Ann,4)

<subClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http:/
/www.w3.org/2001/XMLSchema"><foos><foo><k>Hello, world</k><v>1</v></
foo><foo><k>
Bar</k><v>2</v></foo><foo><k>Baz</k><v>3</v></foo></
foos><bars><bar><k>Bar-bar-b
ar-bar-barbra-Ann</k><v>4</v></bar></bars></subClass>
*/







Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland