• Home
  • RSS Feed
  • Log in

Posts Tagged ‘xpath’

yamsellem

JAXB, XML Data Binding
Posted by yamsellem in the early morning: March 17th, 2011

As an ubiquitous exchange format, XML is well implemented in java. But those implementations hide how they perform the data binding from a XML structure to an object graph. It leaves us helpless in front of an application giving XML as a plain old string. Because low level API (DOM, XPath) — focused on document structure — are tedious, major JAX-RS implementation (Jersey, CXF) have chosen the same high level API — focused on data —: JAXB. Let’s do the same.

(more…)

Share

Tags: Data Binding, DOM, JAX-RS, jaxb, XML, xpath, XSD
Filed under Java, Tools | No Comments »

Age Mooij

Pimping the Scala XML library
Posted by Age Mooij in the late evening: July 25th, 2009

Earlier this week I ran into a missing feature in the Scala xml library and I ended up adding this feature myself, which turned out to be pretty simple.

I was trying to extract the text contents of an element in a piece of XML using the handy \ and \\ methods on scala.xml.NodeSeq. These methods allow you to extract sub-elements from an XML node in a way very similar to XPath, something like this:

val xml = <a><b><c>text</c></b></a>
val c1 = xml \ "b" \ "c"
val c2 = xml \\ "c"
val text = c2.text

The problem I ran into occurred when I tried to use these methods to extract an element when one of its attributes had a certain value.

(more…)

Share

Tags: Scala, XML, xpath
Filed under General | 3 Comments »


Xebia Sites

  • Xebia Corporate
  • Xebia France
  • Xebia India
  • Xebia Sweden

Categories

  • Java (311)
  • Agile (181)
  • General (136)
  • Scrum (67)
  • Architecture (64)
  • Testing (59)
  • Performance (46)
  • Middleware (56)
    • Deployment (38)
  • Xebia Labs (39)
  • SOA (31)
  • Podcast (31)
  • Project Management (28)
  • Tools (26)
  • Uncategorized (20)
  • lean architecture (20)
  • Quality Assurance (17)
  • Articles (13)
  • Requirements Management (13)
  • Virtualization (19)

Tag Cloud

    JPA implementation patterns Maven Concurrency Control Java SOA Javascript TDD Lean agile architectuur Moving to India Scrum lean architecture Flex product owner Agile Eclipse Grails Groovy Hibernate Ajax Frameworks XML Oracle Spring Scala ACT JPA Xebia lean architectuur Architecture

Archives

  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
Avatars by Sterling Adventures