====== 'Java' version of 'XPPq' (xppq-java') ====== ^ //[[:s:x:GitHub]]// ^ //[[:s:x:Travis CI]]// (//GNU/Linux// & //macOS//) ^ //[[:s:x:AppVeyor]]// (//Windows//) ^ | [[:github:xppq-java:|{{https://img.shields.io/badge/v-20170928-blue.png|xppq-java on GitHub}}]] | [[:travis-ci:xppq-java:|{{https://img.shields.io/travis/epeios-q37/xppq-java.png|xppq-java on Travis CI}}]] | [[:appveyor:xppq-java:|{{https://img.shields.io/appveyor/ci/epeios-q37/xppq-java.png|xppq-java on AppVeyor}}]] | ===== Description ===== This //Java// component provides an //XML// parser and preprocessor. ===== Installation ===== See [[:s:i:main:|installation]]. As indicated, to use this component, you also need the //[[:tools:JREq:]]// wrapper. ===== Usage ===== If you want to test, launch ''java XPPqTest''. ==== Parser ==== ''xppq-java'' provides an //XML// //pull-parser// . You will find an example of use of the parser [[https://github.com/epeios-q37/xppq-java/blob/master/src/xppq.java#L155|here]]. ''XPPqParser'' is the parser, and ''XPPqData'' contains information about each token that the parser encounter. ==== The preprocessor ==== Preprocessor is a stream providing //XML// data which takes a stream containing //XML// data. So, if you have a method which takes a stream containing //XML// data, such as the parser above, you can insert the preprocessor between them. [[https://github.com/epeios-q37/xppq-java/blob/master/src/xppq.java#L184|Here]] is an example of a method which parses a file containing //XML// data, and [[https://github.com/epeios-q37/xppq-java/blob/master/src/xppq.java#L191|here]] the same method processing the same data once preprocessed. The only difference is that you have ''parse( new java.io.FileInputStream( fileName ) );'' for the first method and ''parse( new XPPqPreprocessor( new java.io.FileInputStream( fileName ) ) );'' for the second. ===== Other ===== See //[[:tools:XPPq]]//.