XMLWriter Data Type

Official Content

The aim of this data type is to provide the possibility of recording XML files or strings. 


In order to be able to create an XML file or string from a GeneXus object you must define an XMLWriter data type variable and then invoke the methods needed to create the nodes that compose it.




The following procedure generates a file called MEETING.xml that contains the data for a meeting, indicating the people who participated in it and their corresponding tasks. 
	For Each
    &XMLWriter.WriteAttribute('Date', DToC(ReuFch))
    &XMLWriter.WriteElement('DATE', DToC(ReuFch))
    &XMLWriter.WriteComment('Meeting Description')    
    For Each
    For Each

The MEETING.xml file contains:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<MEETING Date="06/03/01">
   <!—Meeting’s description-->
<! [ CDATA [ Application development team’s meeting.
The meting took place on Friday at 9:30. ] ] >
   <! [ CDATA [ Write the application’s documentation ] ] >
   <! [ CDATA [ Meet with clients ] ] >
   <! [ CDATA [ Write user’s manual ] ] >
   <! [ CDATA [ Document the specifications ] ] >


Objects: Procedures, Transactions, Web Panels
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

See Also


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.