diff --git a/lib/OfxParser/Parser.php b/lib/OfxParser/Parser.php index 5a5f6df..0bd22a4 100644 --- a/lib/OfxParser/Parser.php +++ b/lib/OfxParser/Parser.php @@ -43,7 +43,8 @@ public function loadFromFile($ofxFile) public function loadFromString($ofxContent) { $ofxContent = utf8_encode($ofxContent); - + $ofxContent = str_replace("<", "\n<", $ofxContent); //add linebreaks to allow XML to parse + $sgmlStart = stripos($ofxContent, ''); $ofxHeader = trim(substr($ofxContent, 0, $sgmlStart)); $ofxSgml = trim(substr($ofxContent, $sgmlStart)); @@ -115,4 +116,4 @@ private function convertSgmlToXml($sgml) return trim($xml); } -} \ No newline at end of file +}