Domino 9 und frühere Versionen > ND6: Entwicklung
RichText in RichText EINFÜGEN
eknori (retired):
Na, ich bin in meiner Naivität davon ausgegangen, daß der DomParser die <> Tags automatisch in neue Nodes umsetzt
So sollte aus dem <par>RT:RTONE</par> ein
<par><picture height='71px' width='108px'><notesbitmap>
lQAmAAAAAAAAAAAAAAABAAAAAAAAAGwARwAIAAEACAACAE0ABwCWAFUIAAAAAAAAAAAAADIAQwgD
...
</par>
werden.
die <> werden aber in als text betrachtet, so daß an der Stelle nicht das Bild sondern halt eben der String erscheint.
eknori (retired):
Irgendwie habe ich das Gefühl, daß ich mit meinem Code in eben dieselbe Sackgasse laufe, wie Rocky Oliver
--- Zitat ---Lesson Two: The NotesDOMParser lacks the InsertBefore method
Now that the new node is moved into the desired document, it needs to be moved into the proper position. Normally the InsertBefore method could be used to move the node into the proper position; however the NotesDOMParser doesn't have an InsertBefore method either, so I basically decided to abandon using the NotesDOMParser altogether. Instead I went "low-tech". I now export the form to DXL, and then simply search the DXL for a particular text tag that I added to the form to find the location where the new code should go, then I use a LS version of @ReplaceSubstring to add the new code. Once the new code is added I reimport it into the database using the NotesDXLImporter. This method works GREAT, and is very very fast.
So, my basic conclusion is that the NotesDOMParser is nice for reading XML documents, but it is really not useful for manipulating XML documents in any advanced way.
--- Ende Zitat ---
( http://www.lotusgeek.com/SapphireOak/LotusGeekBlog.nsf/d6plinks/ROLR-6CTKKN )
Das FindAndReplace hatte ich ja anfangs auch schon probiert; allerdings habe ich das FindAndReplace der NotesRichTextRange class verwendet, und das ist ja bei umfangreicheren Ersetzungen in die Grätsche gegangen.
Ich probiere das jetzt noch einmal mit einer eigenen Routine.
eknori (retired):
DOMParser ade; auch nach Re-Konfiguration des Tachyonenstrahls und NeuAusrichtung der DiLithium Matrix ist da nix zu löten an der Holzkiste ...
Ich versuche das jetzt mal mit DXLExport in ein RichTextFeld, zeilenweises AppendText in ein weiteres RTFeld; an den Stellen, wo das RT:Irgendwas steht, hole ich mir die Informationen zeilenweise aus einem weiteren RTFeld, in das ich per DXLExport die daten aus dem einzufügenden feld exportiert habe.
Sind die daten drin, hänge ich Zeile für Zeile den Rest unten an und importiere mittels DXLImport.
Dürfte nicht sonderlich performant sein, aber darauf kommt es mir jetzt nicht mehr an. Ich will das zum Laufen bekommen !!!
Rocky macht das auch mit FindAndReplace. Er hat vermutlich nicht mit groesseren Datenmangen getestet. Ich werde ihn mal fragen ...
Weitere Möglichkeit, wäre Java zu nehmen. Da kennt Axel bestimmt irgendwas, was man in Notes verwenden kann.
Oder MSXML ...
Oder ich schreibe das in c++ und stelle die benötigtnen Funktionen als dll zur Verfügung ...
Thomas Schulte:
Midas 2?
oder übernächste Woche Montag doch mit einem langen Anlauf und spitzen Stiefeln mit Stahlkappen direkt in den Backstage Bereich reintreten.
eknori (retired):
Ich versuche das jetzt mal mit DXLEXPORT, NotesSTREAM und DXLIMPORT. Sind dann insgesamt 3 Files auf der Festplatte (!) Man kann ja nicht direkt in ein RT Feld streamen um es dann bequem DXL importen zu können. Da fehlen beim Stream die SetInput und SetOutput Methoden
--- Zitat ---Midas 2?
--- Ende Zitat ---
Nein, aber unter c++ gibt es einen Haufen fertiger Libs, die das XML InsertBefore gut können ...
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln