JBoss.orgCommunity Documentation

Chapter 19. XML Document Sequencer

This sequencer stores the structure and data of an XML file into the repository. DTD, entity, comments, and other content are maintained by the sequencer in the output structure.

JcrConfiguration config = ...

config.sequencer("XML Sequencer")
      .usingClass("org.jboss.dna.sequencer.xml.XmlSequencer")
      .loadedFromClasspath()
      .setDescription("Sequences XML documents and maps their data into the repository")
      .sequencingFrom("//(*.xml[*])/jcr:content[@jcr:data]")
      .andOutputtingTo("/xml/$1");