Have anyone tried this code before?
XmlSource<String> source = XmlSource.<String>from("gs://balajee_test/sample_3.xml")
.withRootElement("book")
.withRecordElement("author")
.withRecordElement("title")
.withRecordElement("genre")
.withRecordElement("price")
.withRecordElement("description")
.withRecordClass(XMLFormatter.class);
PCollection<String> output = p.apply(Read.from(source));
https://beam.apache.org/documentation/sdks/javadoc/0.4.0/org/apache/beam/sdk/io/XmlSource.html
org.apache.beam.sdk.io.xml.XmlSource
Hope I'm using the correct 'XmlSource' class but still not able to resolve dependencies for method 'from("gs://balajee_test/sample_3.xml")' and getting compilation error for the same. The error message is :
The method from(String) is undefined for the type XmlSource
This question may go too silly but I really need to get it resolved in order to be able to read XML File stored in GCS Bucket.