Package com.saxonica.functions.qt4.csv
Class CsvXmlGenerator
java.lang.Object
com.saxonica.functions.qt4.csv.CsvRepresentationGenerator
com.saxonica.functions.qt4.csv.CsvXmlGenerator
Handles generating a simple XML representation of a CSV from a sequence of array items
(
array(xs:string)*).-
Field Summary
Fields inherited from class com.saxonica.functions.qt4.csv.CsvRepresentationGenerator
explicitColumnNames, extractHeaderRow, options, rowAdjuster, trimRows -
Constructor Summary
ConstructorsConstructorDescriptionCsvXmlGenerator(Map<String, GroundedValue> options, XPathContext context, String staticBaseUri) Construct an instance using the passed in options Map. -
Method Summary
Modifier and TypeMethodDescriptionGenerate an XML representation of a CSV from the provided sequence of rows (array(xs:string)*.Methods inherited from class com.saxonica.functions.qt4.csv.CsvRepresentationGenerator
generateColumnNames, makeRowTrimmer
-
Constructor Details
-
CsvXmlGenerator
public CsvXmlGenerator(Map<String, GroundedValue> options, XPathContext context, String staticBaseUri) throws XPathExceptionConstruct an instance using the passed in options Map.- Parameters:
options- options for the conversion as a map of String : Sequence pairscontext- the current XPath context- Throws:
XPathException- if there's a problem getting values from the options
-
-
Method Details
-
fromRowSequence
Generate an XML representation of a CSV from the provided sequence of rows (array(xs:string)*.- Specified by:
fromRowSequencein classCsvRepresentationGenerator- Parameters:
rows- the sequence of rows (ArrayItems)- Returns:
- the XML document
- Throws:
XPathException- if tree building fails
-