Class/Object

com.codecommit.antixml

Elem

Related Docs: object Elem | package antixml

Permalink

case class Elem(prefix: Option[String], name: String, attrs: Attributes = Attributes(), namespaces: NamespaceBinding = NamespaceBinding.empty, children: Group[Node] = Group.empty) extends Node with Selectable[Elem] with Product with Serializable

An XML element consisting of an optional namespace prefix, a name (or identifier), a set of attributes, a namespace prefix scope (mapping of prefixes to namespace URIs), and a sequence of child nodes. For example:

<span id="foo" class="bar">Lorem ipsum</span>

This would result in the following node:

Elem(None, "span", attrs = Attributes("id" -> "foo", "class" -> "bar"), children = Group(Text("Lorem ipsum")))

TODO: Consider making Elem not a case class and handle thing a different way.

Source
node.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, Selectable[Elem], Node, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Elem
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Selectable
  7. Node
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Elem(prefix: Option[String], name: String, attrs: Attributes = Attributes(), namespaces: NamespaceBinding = NamespaceBinding.empty, children: Group[Node] = Group.empty)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def \(selector: Selector[Node]): Zipper[Node]

    Permalink

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

    def \[B, That](selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[Group[Elem], B, That]): That

  5. def \\(selector: Selector[Node]): Zipper[Node]

    Permalink

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

    def \\[B, That](selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[Group[Elem], B, That]): That

  6. def \\!(selector: Selector[Node]): Zipper[Node]

    Permalink

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

    def \\![B, That](selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[Group[Elem], B, That]): That

  7. def addAttributes(attrs: Seq[(QName, String)]): Elem

    Permalink
  8. def addChild(node: Node): Elem

    Permalink

    Convenience method to allow adding a single child in a chaining fashion.

  9. def addChildren(newChildren: Group[Node]): Elem

    Permalink

    Convenience method to allow adding children in a chaining fashion.

  10. def addNamespace(uri: String): Elem

    Permalink
  11. def addNamespace(prefix: String, uri: String): Elem

    Permalink

    Adds a namespace with a given prefix

  12. def addNamespaces(namespaces: Map[String, String]): Elem

    Permalink

    Adds the Map of prefix -> namespace to the scope.

    Adds the Map of prefix -> namespace to the scope. If the prefix is the empty prefix, a new prefix is created for it. If the namespace has been already registered, this will not re-register it. (It is allowed by the XML spec, but kind of pointless in practice)

  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def attr(fqname: FQName): Option[String]

    Permalink
  15. def attr(name: QName): Option[String]

    Permalink
  16. val attrs: Attributes

    Permalink
  17. def canonicalize: Elem

    Permalink

    See the canonicalize method on com.codecommit.antixml.Group.

  18. val children: Group[Node]

    Permalink

    Returns the children of this node.

    Returns the children of this node. If the node is an com.codecommit.antixml.Elem, then this method returns the element's children. Otherwise, it returns an empty com.codecommit.antixml.Group.

    Definition Classes
    ElemNode
  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. val name: String

    Permalink
  25. val namespaces: NamespaceBinding

    Permalink
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. val prefix: Option[String]

    Permalink
  30. def removeAttribute(attr: QName): Elem

    Permalink
  31. def select(selector: Selector[Node]): Zipper[Node]

    Permalink

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

    def select[B, That](selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[Group[Elem], B, That]): That

  32. def setAttributes(attrs: Seq[(FQName, Option[String])]): Elem

    Permalink

    Use the uri in the FQName to lookup the binding, otherwise add a namespace with the given default prefix.

    Use the uri in the FQName to lookup the binding, otherwise add a namespace with the given default prefix. If the prefix/no prefix is already in use create a new name.

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toGroup: Group[Elem]

    Permalink
    Definition Classes
    ElemSelectable
  35. def toString(): String

    Permalink
    Definition Classes
    Elem → AnyRef → Any
  36. def toZipper: Zipper[Elem]

    Permalink
    Definition Classes
    Selectable
  37. def traverse[F[_]](f: (Node) ⇒ F[Node])(implicit F: Applicative[F]): F[Elem]

    Permalink
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. def withAttribute(attr: (QName, String)): Elem

    Permalink

    Convenience method to allow adding attributes in a chaining fashion.

  42. def withAttributes(attrs: Attributes): Elem

    Permalink
  43. def withChildren(children: Group[Node]): Elem

    Permalink

    Convenience method to allow replacing all children in a chaining fashion.

  44. def withName(name: String): Elem

    Permalink
  45. def writeTo(writer: Writer, charset: Charset = ...): Unit

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Selectable[Elem]

Inherited from Node

Inherited from AnyRef

Inherited from Any

Ungrouped