D
Durango@google
Hello, I am trying to read a stream from a URL into a Inputsource and
pass that to a DOM parser.
The URL links to a RSS file and I am able to successfully read this.
The problem I am having is that, the data that the stream reads causes
the parser to throw errors.
This is because the RSS stream starts with a newline character. If
the newline character is removed than the parser works fine.
I was able to read the RSS stream and write it to a file omitting the
newline character.
After that I read the file stream into the Inputsource and passed it
to the Dom parser.
This worked fine, however I do not want to save it to a file, rather I
would like to know if there is
a way to manipulate the stream before passing it to the Inputsource
before it gets passed to the parser?
Anyone have any suggestions for the issue I am facing?
pass that to a DOM parser.
The URL links to a RSS file and I am able to successfully read this.
The problem I am having is that, the data that the stream reads causes
the parser to throw errors.
This is because the RSS stream starts with a newline character. If
the newline character is removed than the parser works fine.
I was able to read the RSS stream and write it to a file omitting the
newline character.
After that I read the file stream into the Inputsource and passed it
to the Dom parser.
This worked fine, however I do not want to save it to a file, rather I
would like to know if there is
a way to manipulate the stream before passing it to the Inputsource
before it gets passed to the parser?
Anyone have any suggestions for the issue I am facing?