trait LSSerializer extends Serializer
Default serializer, correctness first. Uses the LSSerializer present in each DOM L3 impl. XmlItems are always serialized with the LS, elements and attributes are however for speed reasons, verified for encoding once per QName; the attribute values themselves are written via Text nodes and LS.
- Alphabetic
- By Inheritance
- LSSerializer
- Serializer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract val data: SerializerData
- abstract val doc: Document
- abstract val docBuilderF: DocumentBuilderFactory
- abstract val encMap: (String) => Option[Throwable]
Can the ncName be mapped for a given encoding
- abstract val impl: DOMImplementationLS
- abstract val lsaout: LSOutput
- abstract val lsout: LSOutput
- abstract val lss: org.w3c.dom.ls.LSSerializer
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- lazy val canEncode: (String) => Boolean
See default SF for logic on this, however faulty :-)
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def ct(t: => Boolean, s: => String): Option[Throwable]
- def doElem(qName: QName, attribs: Traversable[Attribute], ns: Map[String, String], declareDefaultNS: Option[String]): Option[Throwable]
Override this to order the attributes.
- def emptyElement(qName: QName, attributes: Traversable[Attribute], namespaces: Map[String, String], declareDefaultNS: Option[String], path: List[QName]): Option[Throwable]
- Definition Classes
- LSSerializer → Serializer
- lazy val encoder: CharsetEncoder
- def endElement(qName: QName, path: List[QName]): Option[Throwable]
- Definition Classes
- LSSerializer → Serializer
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def item(item: XmlItem, path: List[QName]): Option[Throwable]
LSSerializer in 6_24 is garbage, but the xalan one isn't much better.
LSSerializer in 6_24 is garbage, but the xalan one isn't much better. jre uses hex, xalan numberic character refs. And jre is totally useless for cdata, writing no end part, both ignore the split-cdata-sections option when escaping, choosing to split, I assume this is only being done for character refs but follows the DOMConfiguration (instead of the load and save spec) for end sequence splitting.
As such there only seems to be one safe way to handle this: # Use the encoder to check if a CData or Comment can be written without splitting, throw if it can't. # Write the start and end CData directly
- Definition Classes
- LSSerializer → Serializer
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def startElement(qName: QName, attributes: Traversable[Attribute], namespaces: Map[String, String], declareDefaultNS: Option[String], path: List[QName]): Option[Throwable]
- Definition Classes
- LSSerializer → Serializer
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- lazy val textNode: org.w3c.dom.Text
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def writeAttr(before: => String, toCt: => String, after: => String): Option[Throwable]
- def writeNonText(item: XmlItem, path: List[QName]): Option[Throwable]
Performs the actual write for Comments/CData/PI, due to LSSerializer issues this function is seperated for easy overriding, should anyone really trust their DOM/JAXP versions.
Performs the actual write for Comments/CData/PI, due to LSSerializer issues this function is seperated for easy overriding, should anyone really trust their DOM/JAXP versions.
For this method to be called the encoding has already been verified.
- def xmlDeclaration(encoding: Charset, version: XmlVersion): Option[Throwable]
- Definition Classes
- LSSerializer → Serializer