GenoPro Developer Home
GenoPro Home  |  SDK Home  |  Report Generator  |  Support  |  Search  |  Help  |  Site Map

Skip Navigation Links.

Document.GetTextXML Method

The GetTextXML method returns a Unicode string of the entire document. The returned string includes detailed information of all GenoMaps, individuals, families, pedigree links, pictures, sources and citations and more.

Usage:
If you are generating a report and need detailed information about the genealogy tree. If you know how to parse and use XML, then this method will give you all the data of the genealogy tree.

strTextXML = ReportGenerator.Document.GetTextXML

Performance Notes:
Calling the method GetTextXML is very slow. It is faster than reading the equivalent XML file from disk, however it requires considerable processing to generate the XML content. As a result, it is recommended to cache the value in the Session object as the sample code below so you don't have to get the XML string each time you generate an HTML page.

Better yet is to parse the XML and store the parsed result to the Session object.

Dim strTextXML strTextXML = Session("strTextXML") 

If (IsEmpty(strTextXML)) Then
      strTextXML = ReportGenerator.Document.GetTextXML Session("strTextXML") = strTextXML 
End If 
Other Usage:
You can use the GetTextXML for OLE Automation.
<SCRIPT LANGUAGE=VBScript>
Dim docGenoPro
Sub btnOpen_onclick()
	Set docGenoPro = CreateObject("GenoPro.Document")
	docGenoPro.ShowWindow
	docGenoPro.SetTextXML editSource.Value
End Sub

Sub btnGetText_onclick()
	edit2.Value = docGenoPro.GetTextXML
End Sub
</SCRIPT>

Remarks:
Each time the method GetTextXML is called, a new Unicode string is generated containing the complete data for the document. Since the XML contains caching information, it is possible GetTextXML returns a slightly different string for the same genealogy tree.  For instance, the returned XML string includes image dimension such as width and height, so if a picture has been loaded since the previous call to GetTextXML, then the following cache entry will be added to the returned string.
<Picture id="pic00002"> 
   <path relative="..\..\help\MorinFamily.1997.jpg" file_unique="MorinFamily.1997.jpg" report="pictures/MorinFamily.1997.jpg">
          D:\GenoPro\help\MorinFamily.1997.jpg</path> 
   <cache path="D:\GenoPro\help\MorinFamily.1997.jpg" sizeKB="13" dimension="223x204" megapixels="0.04" bpp="24" dpi="150" />
   <name>The Morin Family in 1997</name>
</Picture> 
 

Copyright ┬ę 1998-2014. All rights reserved. GenoPro┬« and the GenoPro logo are registered trademarks.