It's actually pretty simple. The tricky part, of course, is that
certain characters must be represented as entities (i.e., encoded)
within an XML document. Fortunately, there's a utility to do that for
you. Without looking it up, I believe it's $$SYMENC^MXMLUTIL. Having
said that, the easiest way to get a WP field into an array is to call
$$GET1^DIQ. You jusst then $ORDER through the array reading lines,
encoding them and writing them out. For the reverse operation (taking
text contained within an XML element and saving it in a WP field) the
procedure depends on whether you're using the event driven (SAX) parser
or MXMLDOM
 In the former case, you'll get one text event per line of text within
the document (though the specification only says that you will receive
SOME of the text without saying anything about how it's broken up).
Keep track of the line number and save each line in an array. With
MXMLDOM it's easier (of course): when you reach the element containing
the text, just call TEXT^MXMLDOM (if you know there's only one line,
you can call it as an extrinsic). Anyway, this will copy the text into
an array you pass by name, and that array can be used as an argument to
WP^DIE to copy the text into a WP field.

--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> Greg,
> 
> I think I may even add this as a function to my
> fileman.  Would you mind posting your code to save me
> the time?  Thanks
> 
> Kevin
> 
> --- Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> 
> > At first I tried exporting WP fields to flat files
> > with a simple loop,
> > but have since started using XML for this purpose.
> > Using the MXML
> > parser it's actually quite straightforward.
> > 
> > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
> > 
> > > Ann,
> > > 
> > > It would be a fairly short program to print out
> > the
> > > fields to a text file.  But what will you do if
> > your
> > > word-processor field contains a comma?  Won't that
> > > mess up your comma delineation of fields?  What
> > about
> > > writing out the data in XML format?  Could you use
> > > that?
> > > 
> > > Kevin
> > > 
> > > 
> > > 
> > > --- ann cooney <[EMAIL PROTECTED]> wrote:
> > > 
> > > > I am looking for a workaround for VA Fileman's
> > > > export limitation with word processing 
> > > > fields - quote from VA Fileman's reference
> > "can't
> > > > use the Import or 
> > > > Export Tools to exchange word processing fields
> > from
> > > > VA FileMan files..." 
> > > > 
> > > > I am just starting out using Fileman without
> > knowing
> > > > how to program in 
> > > > mumps (tho I do program in v.basic, e.g) - but
> > am
> > > > willing to learn M.  I have been asked to export
> > > > specific fields from the M database to comma
> > > > delimited file and import 
> > > > into MS Access for data analysis.  I have been
> > > > successful except for the word processing
> > fields. 
> > > >  
> > > > From the archives, I have a sense or what is the
> > > > most likely solutions, but would like a little
> > more
> > > > detail on #1 below: 
> > > > 1) extracting multiline fields one by one - How
> > > > would one go about doing this? Is it part of the
> > > > export tool? or 
> > > > 2) Creating a print template and capturing the
> > > > output.
> > > >  
> > > > ACee
> > > >  
> > > > 
> > > >                 
> > > > ---------------------------------
> > > > Celebrate Yahoo!'s 10th Birthday! 
> > > >  Yahoo! Netrospective: 100 Moments of the Web 
> > > 
> > > 
> > > 
> > >   
> > >           
> > > __________________________________ 
> > > Celebrate Yahoo!'s 10th Birthday! 
> > > Yahoo! Netrospective: 100 Moments of the Web 
> > > http://birthday.yahoo.com/netrospective/
> > > 
> > > 
> > >
> >
> -------------------------------------------------------
> > > SF email is sponsored by - The IT Product Guide
> > > Read honest & candid reviews on hundreds of IT
> > Products from real
> > > users.
> > > Discover which products truly live up to the hype.
> > Start reading now.
> > >
> >
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > > _______________________________________________
> > > Hardhats-members mailing list
> > > Hardhats-members@lists.sourceforge.net
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > > 
> > 
> > =====
> > A practical man is a man who practices the errors of
> > his forefathers. --Benjamin Disraeli
> > ====
> > Greg Woodhouse 
> > [EMAIL PROTECTED] 
> > [EMAIL PROTECTED] 
> > 
> > 
> > 
> > 
> > 
> >
> -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT
> > Products from real users.
> > Discover which products truly live up to the hype.
> > Start reading now.
> >
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > Hardhats-members mailing list
> > Hardhats-members@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> > 
> 
> 
> 
>       
>               
> __________________________________ 
> Celebrate Yahoo!'s 10th Birthday! 
> Yahoo! Netrospective: 100 Moments of the Web 
> http://birthday.yahoo.com/netrospective/
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real
> users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 

=====
A practical man is a man who practices the errors of his forefathers. 
--Benjamin Disraeli
====
Greg Woodhouse 
[EMAIL PROTECTED] 
[EMAIL PROTECTED] 





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to