A clean-room replacement for scala.xml
Questions tagged [anti-xml]
11 questions
11
votes
1 answer
An example of xml processing but using anti-xml instead of Scala xml
I'd like to see a rewrite of bellow script using http://anti-xml.org instead of Scala XML.
This is an excerpt from Chapter 10. Herding XML in Scala - http://ofps.oreilly.com/titles/9780596155957/HerdingXMLInScalaDSLs.html
//…

Rodolfo
- 261
- 4
- 10
8
votes
2 answers
Can you use antixml to create xml documents?
there are a few examples for using Anti-Xml to extract information from XML documents, but none that I could find of using Anti-Xml to create XML documents. Does Anti-Xml support creating documents, or should I use another library for this (which…

schmmd
- 18,650
- 16
- 58
- 102
6
votes
2 answers
Append element as child of Anti-XML element
Suppose I have an XML document stored as an Anti-XML Elem:
val root : Elem =
. I want to append blahblahblah to the root element as a child, giving
val modified_root : Elem =

Mechanical snail
- 29,755
- 14
- 88
- 113
4
votes
2 answers
Replacing an XML node with Anti-XML
I am struggling to replace a XML element with another one using the library anti-xml. For instance, I have:
and the fragment:
foo
…

paradigmatic
- 40,153
- 18
- 88
- 147
3
votes
1 answer
Anti-XML Group "collect" is not collecting
I am cross-posting this from scala-user:
I have the following:
object XmlTest {
import com.codecommit.antixml._
implicit def toPicker(nodes: Group[Node]): Picker = new Picker(nodes)
class Picker(nodes: Group[Node]) {
def pick[A <: Node…

Walter Chang
- 11,547
- 2
- 47
- 36
3
votes
1 answer
Scala XML Library for 2.10+
I've been surprised by how non-intuitive the standard Scala XML library is (beyond defining in-line XML and basic path tree traversal) as well as the lack of any apparent replacements. It looks like at one point anti-xml was gaining traction but it…

eharik
- 155
- 1
- 8
3
votes
1 answer
Zipping zippers in Anti-XML
In this question, the asker wants to transform documents like this:
The capitals of Bolivia are and .
Into this:
The capitals of Bolivia are and .
As I…

Travis Brown
- 138,631
- 12
- 375
- 680
2
votes
1 answer
Anti-XML scala hides xml attribute
Anti-xml will be the successor xml library in Scala. But I have found something that quirks.
Input
package com.twitter.sample
import com.codecommit.antixml._
object ReadingNamespaceXml extends Application{
val xml =

shuttle
- 153
- 1
- 11
2
votes
1 answer
Build XML literal containing Anti-XML object
Suppose I have an Anti-XML object, e.g.:
import com.codecommit.antixml._
val child = ... .convert
I want to construct an XML object that contains child as a child:

Mechanical snail
- 29,755
- 14
- 88
- 113
1
vote
1 answer
Anti-XML: Some modifications on Zipper with custom Selectors don't persist after unselect
To test a method that would transform Text elements in an XML document I wrote two very simple Selectors and applied map/toUpperCase on the resulting Zipper. The result should be that all text elements except those excluded via the first Selector…

fbaumgardt
- 21
- 4
0
votes
2 answers
Best way to remove an element in an XML using anti-xml
What would be the best and/or simplest way to remove an element from a XML document using anti-xml?

JWC
- 1,745
- 2
- 12
- 14