DeltaXML.com - Change Control For XML, In XML.(spacer) Home    About Us    Contact Us    Search
(spacer)

Stream String Example

Introduction

This code shows how Stream input and output can be used with Java Strings. While using the hardcoded Strings in this example code is somewhat unrealistic, String extracted from a GUI widget or from a database may be more likely uses.

Two comparisons are performed, the first shows correct behaviour and the second shows the advantages of using systemIds when reporting errors.

The pipeline consists of a single DeltaXML comparator.

Compile and Run

Please use the provided Ant script, or for Windows Systems with J2SE 1.4.x, use the following commands:

Compile:
  javac StreamString.java

Run:
  java -cp ../deltaxml.jar;. StreamString

Note: We have experienced problems using the systemId and StreamSource when having saxon.jar on the classpath. We recommend that this example is run without using Saxon.

Manifest

README.txt

This file

build.xml

Ant script for compilation, running, tidyup

StreamString.java

Pipeline source code

 (spacer)Copyright © 2000-2005 DeltaXML Ltd, Malvern, UK. All rights reserved.
info@deltaxml.com