Skip to content

Instantly share code, notes, and snippets.

View eed3si9n's full-sized avatar

eugene yokota eed3si9n

View GitHub Profile
@eed3si9n
eed3si9n / xmlprotocol.scala
Created November 17, 2011 02:36
xml protocol generated by general test
// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
package general
/**
usage:
val obj = scalaxb.fromXML[general.Foo](node)
val document = scalaxb.toXML[general.Foo](obj, "foo", general.defaultScope)
**/
object `package` extends XMLProtocol { }
@retronym
retronym / xml-namespace.scala
Created April 29, 2011 15:51
Scala XML Namespace wrangling
object XmlRewriteUtil {
def rewriter(f: PartialFunction[Node, NodeSeq]): RuleTransformer = new RuleTransformer(rule(f))
def rule(f: PartialFunction[Node, NodeSeq]): RewriteRule = new RewriteRule {
override def transform(n: Node) = if (f.isDefinedAt(n)) f(n) else n
}
}
def setNamespace(node: Node, prefix: String, namespace: String): Node = {
import XmlRewriteUtil._
#SingleInstance FORCE
#NoEnv
^`::
DetectHiddenWindows, off
IfWinExist, bash
{
wingetpos, wx, wy, wwidth, wheight
counter=0
1. Dump contents of http://www.w3.org/2003/05/soap-envelope/ to soap12.xsd
and put that somewhere alongside the other schemas.
2. Run scalaxb, you'll end up with a soap12.scala & company.
3. See sample code. Call envXml and get back XML representation of envelope,
header, and body all in one.
Using worker: worker-linux-4-2.bb.travis-ci.org:travis-linux-5
git.1
0.21s$ git clone --depth=50 --branch=withConsolidatedResolution git://github.com/xuwei-k/scalikejdbc.git xuwei-k/scalikejdbc
Cloning into 'xuwei-k/scalikejdbc'...
remote: Counting objects: 1073, done.
remote: Compressing objects: 100% (695/695), done.
remote: Total 1073 (delta 330), reused 822 (delta 192)
Receiving objects: 100% (1073/1073), 331.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (330/330), done.
Checking connectivity... done.