To illustrate the issue here is a very basic XML file that is structured with indents and has CR/LF characters.
<Book>
<Title>Databa se How To</Title>
</Book>
If I try to copy this into the postgresql database with the following sql.
COPY BOOKS from 'books.txt';
I get an error. "Entity: line 1: parser error : Premature end of data in tag Book."
I can successfully load the file if I structure the file differently so that all the xml is on one line as per below.
<Book><Title>Da tabase How To</Title></Book>
This leads me to think that I need to unstructure the XML so each entry is on one line.
Is there any method to load without having to parse the file via "sed" to remove all CR/LF characters?
<Book>
<Title>Databa se How To</Title>
</Book>
If I try to copy this into the postgresql database with the following sql.
COPY BOOKS from 'books.txt';
I get an error. "Entity: line 1: parser error : Premature end of data in tag Book."
I can successfully load the file if I structure the file differently so that all the xml is on one line as per below.
<Book><Title>Da tabase How To</Title></Book>
This leads me to think that I need to unstructure the XML so each entry is on one line.
Is there any method to load without having to parse the file via "sed" to remove all CR/LF characters?