xml2doc by  http://www.thgsoft.ch/

 

 

 

 

 

xml2doc is an ideal combination of any xml-data files and winword.

You will create in winword a template with all features and advantages of winword. You don’t have to learn xslt/html to create a report . With xml2doc you can use the simplicity of xml data and the feature of word document.

 

Open any xml file. This file will be shown as a tree. So each node can be easily placed into winword using . After defining and storing  the template document( extension .dot) press  to transform the document.

 

All predefined fields are replaced by the data of the xml file.The result is a winword document, which you can modify as easy as you are used to.

Multiple elements can be dynamically create by . The parameter for <xsl:for-each> are the same as XSLT. All Xpath statements can be used.  Inside <xsl:for-each> all nodes should be entered relative to Xpath statement of <xsl:for-each>. Use  to set Xpath to the selected node. All Elements added by pressing  are inserted into the template relative to this xpath. For Attributes use in the same way Attribute Full and Attribute Relative.

 shows all Attributes and Elements of each selected node.

 

 

 

With  an

Xpath expression for the selected node can be evaluated. The result of the evaluation is shown below.

 

Please follow the example below to see how it works and how easily you can create a report based on xml data..

 

xml2doc works with Microsoft Winword 2003 and 2007. All other versions are not testet yet. It works with the standard edition of Winword.


To use xml2doc you will need an installed  msxml from Microsoft.  Further information you will get from Wikipedia about xml, xslt, Xpath a.s.o.

 

 


Get Registered User

 

If you register the product, is it possible to make transformation silently. This allows you to integrate xml2doc in your products for generating Winword Document reports.

Use XML2Doc And Winword For Designing XSL File


With the registered version you can use Winword as an visual graphical XSL(Extensible Stylesheet Language Transformations) Designer. It will create a XSL File which can be used standalone (without winword) for displaying your data. Please visit Wikipedia xml, xslt, for more information


Example

 

Template File looks like:

 

Address

<x2d:for-each select = \"test/People/Person\">

<x2d:value-of select=\"Name/FirstName\"/> <x2d:value-of select=\"Name/LastName\"/>

<x2d:value-of select=\"Address/Street\"/>

<x2d:value-of select=\"Address/ZipCode\"/> <x2d:value-of select=\"Address/City\"/> <x2d:value-of select=\"Address/State\"/>

<x2d:value-of select=\"Job/Title\"/>/

<x2d:value-of select=\"Job/Description\"/>

</x2d:for-each>

 

 

Euro 08 All Games

<x2d:for-each select = \"test/icalendar/vcalendar/vevent\">

<x2d:if test = \"position() mod 2 = 1\">

<x2d:value-of select = \"substring(dtstart, 7,2)\"/>.<x2d:value-of select = \"substring(dtstart, 5,2)\"/>.<x2d:value-of select = \"substring(dtstart, 1,4)\"/>

<x2d:value-of select = \"substring(dtstart, 10,2)\"/>:<x2d:value-of select = \"substring(dtstart, 12,2)\"/>

<x2d:value-of select=\"summary\"/>

__:__

<x2d:value-of select = \"substring(dtend, 7,2)\"/>.<x2d:value-of select = \"substring(dtend, 5,2)\"/>.<x2d:value-of select = \"substring(dtend, 1,4)\"/>

<x2d:value-of select = \"substring(dtend, 10,2)\"/>:<x2d:value-of select = \"substring(dtend, 12,2)\"/>

<x2d:value-of select=\"location\"/>

</x2d:if>

<x2d:if test = \"position() mod 2 = 0\">

<x2d:value-of select = \"substring(dtstart, 7,2)\"/>.<x2d:value-of select = \"substring(dtstart, 5,2)\"/>.<x2d:value-of select = \"substring(dtstart, 1,4)\"/>

<x2d:value-of select = \"substring(dtstart, 10,2)\"/>:<x2d:value-of select = \"substring(dtstart, 12,2)\"/>

<x2d:value-of select=\"summary\"/>

__:__

<x2d:value-of select = \"substring(dtend, 7,2)\"/>.<x2d:value-of select = \"substring(dtend, 5,2)\"/>.<x2d:value-of select = \"substring(dtend, 1,4)\"/>

<x2d:value-of select = \"substring(dtend, 10,2)\"/>:<x2d:value-of select = \"substring(dtend, 12,2)\"/>

<x2d:value-of select=\"location\"/>

 

</x2d:if>

</x2d:for-each>

 

 

The Result after Transformation looks like

Address

Joe Suits

1800 Success Way

98052 Redmond WA

CEO

Runs the company

Linda Sue

1302 American St.

93447 Paso Robles CA

Attorney

Litigates trials

Jeremy Boards

34 Palm Avenue

98052 Waikiki HI

Pro Surfer

Rides waves

Joan Page

700 Webmaster Road

98073 Redmond WA

Web Site Developer

Writes ASP.NET pages

 

Euro 08 All Games

07.06.2008

16:00

Gruppe A: Schweiz - Tschechien

__:__

07.06.2008

18:00

Basel

07.06.2008

18:45

Gruppe A: Portugal - Türkei

__:__

07.06.2008

20:15

Genf

 

11.06.2008

16:00

Gruppe A: Tschechien - Portugal

__:__

11.06.2008

18:00

Genf

11.06.2008

18:45

Gruppe A: Schweiz - Türkei

__:__

11.06.2008

20:45

Basel

 

15.06.2008

18:45

Gruppe A: Schweiz - Portugal

__:__

15.06.2008

20:45

Basel

15.06.2008

18:45

Gruppe A: Tschechien - Türkei

__:__

15.06.2008

20:45

Genf

 

08.06.2008

16:00

Gruppe B: Österreich - Kroatien

__:__

08.06.2008

18:00

Wien

08.06.2008

18:45

Gruppe B: Deutschland - Polen

__:__

08.06.2008

20:45

Klagenfurt

 

12.06.2008

16:00

Gruppe B:Kroatien - Deutschland

__:__

12.06.2008

18:00

Klagenfurt

12.06.2008

18:45

Gruppe B: Österreich - Polen

__:__

12.06.2008

20:45

Wien

 

16.06.2008

18:45

Gruppe B: Österreich - Deutschland

__:__

16.06.2008

20:45

Wien

16.06.2008

18:45

Gruppe B: Kroatien - Polen

__:__

16.06.2008

20:45

Klagenfurt

 

09.06.2008

16:00

Gruppe C: Rumänien - Frankreich

__:__

09.06.2008

18:00

Zürich

09.06.2008

18:45

Gruppe C: Niederlande - Italien

__:__

09.06.2008

20:45

Bern

 

13.06.2008

16:00

Gruppe C: Italien - Rumänien

__:__

13.06.2008

18:00

Zürich

13.06.2008

18:45

Gruppe C: Niederlande - Frankreich

__:__

13.06.2008

20:45

Bern

 

17.06.2008

18:45

Gruppe C: Niederlande - Rumänien

__:__

17.06.2008

20:45

Bern

17.06.2008

18:45

Gruppe C: Italien - Frankreich

__:__

17.06.2008

20:45

Zürich

 

10.06.2008

16:00

Gruppe D: Spanien - Russland

__:__

10.06.2008

18:00

Innsbruck

10.06.2008

18:45

Gruppe D: Griechenland - Schweden

__:__

10.06.2008

20:45

Salzburg

 

14.06.2008

16:00

Gruppe D: Schweden - Spanien

__:__

14.06.2008

18:00

Innsbruck

14.06.2008

18:45

Gruppe D: Griechenland - Russland

__:__

14.06.2008

20:45

Salzburg

 

18.06.2008

18:45

Gruppe D: Griechenland - Spanien

__:__

18.06.2008

20:45

Salzburg

18.06.2008

18:45

Gruppe D: Schweden - Russland

__:__

18.06.2008

20:45

Innsbruck

 

19.06.2008

18:45

VF1: Sieger A - Zweiter B

__:__

19.06.2008

20:45

Basel

20.06.2008

18:45

VF2: Sieger B - Zweiter A

__:__

20.06.2008

20:45

Wien

 

21.06.2008

18:45

VF3: Sieger C - Zweiter D

__:__

21.06.2008

20:45

Basel

22.06.2008

18:45

VF4: Sieger D - Zweiter C

__:__

22.06.2008

20:45

Wien

 

25.06.2008

18:45

HF1: Sieger VF1 - Sieger VF2

__:__

25.06.2008

20:45

Basel

26.06.2008

18:45

HF2: Sieger VF3 - Sieger VF4

__:__

26.06.2008

20:45

Wien

 

29.06.2008

18:45

Finale: Sieger HF1 - HF2

__:__

29.06.2008

20:45

Wien