com.codecommit.antixml

Elem

case class Elem(prefix: Option[String], name: String, attrs: Attributes = Attributes.apply(), namespaces: NamespaceBinding = NamespaceBinding.empty, children: Group[Node] = Group.empty[Nothing]) 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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def \(selector: Selector[Node]): Zipper[Node]

    [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 \\(selector: Selector[Node]): Zipper[Node]

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

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

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

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

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

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

  10. def addChild(node: Node): Elem

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

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

    Convenience method to allow adding children in a chaining fashion.

  12. def addNamespace(uri: String): Elem

  13. def addNamespace(prefix: String, uri: String): Elem

    Adds a namespace with a given prefix

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

    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)

  15. final def asInstanceOf[T0]: T0

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

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

  18. val attrs: Attributes

  19. def canonicalize: Elem

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

  20. val children: Group[Node]

    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
  21. def clone(): AnyRef

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

    Definition Classes
    AnyRef
  23. def finalize(): Unit

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

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

    Definition Classes
    Any
  26. val name: String

  27. val namespaces: NamespaceBinding

  28. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. val prefix: Option[String]

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

    [use case]

    [use case]
    Definition Classes
    Selectable
    Full Signature

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

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

    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.

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

    Definition Classes
    AnyRef
  35. def toGroup: Group[Elem]

    Definition Classes
    ElemSelectable
  36. def toString(): String

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

    Definition Classes
    Selectable
  38. final def wait(): Unit

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

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

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

    Convenience method to allow adding attributes in a chaining fashion.

  42. def withAttributes(attrs: Attributes): Elem

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

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

  44. def withName(name: String): Elem

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

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