Hi,
I know this may be a basic question but I haven't figured out how to create a Document that can be parsed with regular Java XML tools. I would like to validate the document.
I create a NodeSeq like this.
val nodeSeq = scalaxb.toXML(msg, ...)
val bais = new ByteArrayInputStream(nodeSeq.text.getBytes)
...
validator.validate(new StreamSource(bais)
Content is not allowed in prolog.
I tried adding <?xml version="1.0" encoding="utf-8?> with no avail and saw a fix about BOM but not sure how I can take advantage of that. Scala XML examples I found online are pretty lacking.
Thanks,
Eric