title: Can alpakka-xml process multiple xml files?
body: <p>I'm having trouble using alpakka's XmlParsing Flow</p>
  
  <pre><code>val files: List[String] = ... // file paths locally on disk
  
  // simple source emitting the contents of 2 XML files
  val documentSource = FileIO.fromPath(Paths.get(files.head))
    .concat(FileIO.fromPath(Paths.get(files(1))))
  
  val contentFlow: Flow[ParseEvent, CustomContent, Notused] =
    Flow.fromGraph(new ContentProcessorFlow)
  
  documentSource
    .via(XmlParsing.parser)
    .via(contentFlow)
    .to(Sink.foreach(println))
    .run
  </code></pre>
  
  <p>When this is run, the graph prints the elements emitted by <code>contentFlow</code>, which are correct and match the expected values for the first file. After those, this exception is thrown:</p>
  
  <pre><code>[ERROR] [12/20/2018 16:32:23.648] [Sync-akka.actor.default-dispatcher-2] [akka://Sync/system/StreamSupervisor-0/flow-0-0-ignoreSink] Error in stage [akka.stream.alpakka.xml.impl.StreamingXmlParser@36b80955]: Illegal processing instruction target: 'xml' (case insensitive) is reserved by the xml specification
   at [row,col {unknown-source}]: [44,17]
  com.fasterxml.aalto.WFCException: Illegal processing instruction target: 'xml' (case insensitive) is reserved by the xml specification
   at [row,col {unknown-source}]: [44,17]
  at com.fasterxml.aalto.in.XmlScanner.reportInputProblem(XmlScanner.java:1333)
  at com.fasterxml.aalto.async.AsyncByteScanner.checkPITargetName(AsyncByteScanner.java:665)
  at com.fasterxml.aalto.async.AsyncByteArrayScanner.handlePI(AsyncByteArrayScanner.java:2091)
  at com.fasterxml.aalto.async.AsyncByteArrayScanner.nextFromProlog(AsyncByteArrayScanner.java:1064)
  at com.fasterxml.aalto.stax.StreamReaderImpl.next(StreamReaderImpl.java:802)
  at akka.stream.alpakka.xml.impl.StreamingXmlParser$$anon$1.advanceParser(StreamingXmlParser.scala:55)
  </code></pre>
  
  <p>I understand the basics of what's happening here - the parser is complaining about the ByteString of the <code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code> directive at the top of the second file, but I'm not familiar enough with streams to know what to do about it. If I remove the directive I get a slightly different exception about having 2 root elements.</p>
  
  <p>My goal is to build a graph that reads files from a location and emits <code>CustomContent</code> for further processing. How can I rework this to treat each file as a distinct unit of input?</p>