FileApplicationNoteBook.st
changeset 19321 3eac863a8b36
parent 19225 76fd22135c81
child 19384 b6a6b477c5f3
--- a/FileApplicationNoteBook.st	Fri Nov 29 15:09:24 2019 +0100
+++ b/FileApplicationNoteBook.st	Fri Nov 29 15:10:58 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -7293,36 +7295,20 @@
 !
 
 updateXMLTree
-    |lineInStream dom|
 [
     self withWaitCursorDo:[
         [
-            |rawStream inStream encoding|
-
-            rawStream := self fileName readStream.
-            rawStream binary.
-            encoding := CharacterEncoder detectAndSkipBOMInStream:rawStream.
-            rawStream text.
-            encoding notNil ifTrue:[
-                inStream := EncodedStream stream:rawStream encoding:encoding.
-            ] ifFalse:[
-                inStream := rawStream
-            ].
-            lineInStream := LineNumberReadStream on:inStream.
-            [
-                dom := XML::XMLParser 
-                        processDocumentStream:lineInStream
-                        beforeScanDo:[:parser | parser validate:false. ].
-                xmlTreeApp model:dom.
-            ] ensure:[
-                rawStream close
-            ]
+            |dom|
+
+            dom := XML::XMLParser 
+                    processDocumentInFilename:self fileName
+                    beforeScanDo:[:parser | parser validate:false].
+            xmlTreeApp model:dom.
         ] on: XML::XMLSignal do:[:ex |
             Dialog 
                 information:
                     (resources 
-                        stringWithCRs:'Error reported by XML-Parser in line %1:\\%2\\Showing as regular text.' 
-                        with:lineInStream lineNumber 
+                        stringWithCRs:'Error reported by XML-Parser:\\%1\\Showing as regular text.' 
                         with:ex description).
             Error raise.
         ].
@@ -7331,6 +7317,7 @@
 
     "Created: / 17-02-2011 / 13:39:07 / cg"
     "Modified: / 17-02-2011 / 17:39:15 / cg"
+    "Modified (format): / 29-11-2019 / 14:22:26 / Stefan Vogel"
 ! !
 
 !FileApplicationNoteBook::XMLViewApplication methodsFor:'actions'!