Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: CreateDOMParser
Stan Rogers 3.Nov.10 05:04 PM Lotus Notes
Domino Designer 6.5.4 Windows 2003


The NotesDOMParser doesn't convert anything -- it just creates a parse tree from XML text. A text representation of XML is cool, human-readable and easy to transfer across wires from one machine to another, but it's nearly useless for extracting data or manipulating the document. It's just one big string. You would have to write code to search through the string to find what you want, slice it up into substrings, copy portions of it as needed, insert new substrings, etc. That's a royal pain in the backside.

A DOM parser takes the text and converts it into a hierarchical data structure. Once the document has been parsed into a tree (so called because it starts with a "trunk" -- the root document -- and branches off into child elements that may branch off into further children and so on) you have access to a number of methods for searching and changing the tree. The NotesDOMParser is most often used with DXL, but there's nothing special about the NotesDOMParser, and no special relationship between it and DXL. It just happens to be the built-in DOM parser (you can use others in your code, and before Notes and Domino 6, you had to use someone else's parser -- usually the MS version).

As for why your file was empty, well, there was no output from the NotesDOMParser. You would have had to call the parser's Serialize or Output method (they do the same thing; Serialize is an alias for Output) from code called from the PostDOMParse event of the parser:

(in your main code, after you declare the parser but before you use it)

On Event PostDOMParse From domParser Call SomeSubroutine

where SomeSubroutine is declared like this:

Sub SomeSubroutine (Source As NotesDOMParser)
'do stuff here
End Sub

Strictly speaking, you can just launch into playing with the DOM inline with your main code, but that's going to get seriously long and sloppy. When your code resumes to the main routine, call domParser.Serialize or domParser.Output to transform the tree back into text, and that will be streamed to your file.




CreateDOMParser (Mauro T Simoes 3.Nov.10)
. . RE: CreateDOMParser (Stan Rogers 3.Nov.10)
. . . . RE: CreateDOMParser (Mauro T Simoes 4.Nov.10)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow