Xml and notes fields

I need your help my frends…I’m new to XML and I have been studying a new classes for Rich text and I have no idea how to start…I need to encore a Lotusscript agent that grabs all documents with rich text full of XML, parse XML,create a new documents and insert the result into the Notes Fields.

Can I use XSL stylesheet? How to use…? How to accomplish into one agent?

small part of XML from the rich text field

<?xml version="1.0" encoding="UTF-8"?>

<MEMBER_DEMAND xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=“C:\example\DEMAND.xsd”>

<DEMAND DEMAND_NO="56545" SUBMIT_DT="2004-01-01" STATUS_MN="DRAFT" ....................................

Thanks!!!

Subject: Practice XSL Style Sheet

Hi,

If you want to practice XSL Transformation with Lotus Notes, use XSL Lab, a free tool that is included with ANDI 4.0 (http://www.bpjl.com)

With XSL Lab you can set up and test your Style Sheets directly on screen.

Subject: xml and notes fields

You asked this in the 4 and 5 forum too, but there you say you are using 5.0.12. Which is it?

Subject: RE: xml and notes fields

Hi, I’m able to work on Notes 5.0.10 and 6.0.2.

Subject: RE: xml and notes fields

You can get the text from a Rich Text item by using its Text property. Then you have a lot of choices…You do not have to use XML tools to handle the data. You can write your own code to get the pieces of data that you need from the text.

Another way to handle the data is by using a NotesDOMParser to load all the data into memory. Then you can work with the data in the form of node objects. I think this is often the easiest method to code.

Another way to handle the data is by using a NotesSAXParser. This signals an event whenever it gets a piece of data. You write code to respond to each kind of event.

Another way to handle the data is by using a NotesXSLTransformer. This converts the data to a different form of XML. In your case you would convert it to DXL. In the DXL, you define Notes documents and data items. This method requires you to learn XSL.

You also have choices when you create Notes documents and data items.

You do not have to use XML tools to create Notes documents and data items. You can use ordinary LotusScript classes to do that.

Another way to create Notes documents and data items is by creating DXL in a stream. In the DXL, you define Notes documents and data items. Then you use a NotesDXLImporter to import the DXL into a database.

Another way to create Notes documents and data items is by creating a new DOM tree and adding nodes to it. When you finish, you serialize the DOM to make DXL, and use a NotesDXLImporter to import the DXL into a database.

If I had to code your agent, I would probably use two DOM trees – one to handle the original data, and the other to create the Notes documents and items. I do not have sample code for this, but the sample here might interest you.

Subject: xml and notes fields. Thanks Rod!!!