How to link fields from xml to odt file to create conditions

Discuss the word processor

How to link fields from xml to odt file to create conditions

Postby raghava9247 » Fri Feb 15, 2019 8:03 am

Hi Team,

Kindly help how to read values from xml and use in odt file to create conditions.
OpenOffice 4/windows10
raghava9247
 
Posts: 3
Joined: Fri Feb 15, 2019 7:43 am

Re: How to link fields from xml to odt file to create condit

Postby John_Ha » Fri Feb 15, 2019 11:18 am

Hacking or changing any of the .odt xml files is neither recommended nor supported. It is only used as a last resort to repair damaged files.

If you want help on what you are trying to do please give a specific example in detail. It should be achievable without accessing the xml.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6649
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to link fields from xml to odt file to create condit

Postby raghava9247 » Fri Feb 15, 2019 2:34 pm

Hi,

Thanks for your reply.

I will explain my requirement.

I have one predefined template with some text.I will import template in open office. I want to hide and show some text based on some conditions. suppose have one field name Name on top of text. condition is like Name EQ "xyz" show some part of text. other show full text.

here the value "xyz" should pick from xml.
OpenOffice 4/windows10
raghava9247
 
Posts: 3
Joined: Fri Feb 15, 2019 7:43 am

Re: How to link fields from xml to odt file to create condit

Postby John_Ha » Fri Feb 15, 2019 6:03 pm

Search Help with conditional.

It would help if you uploaded a small example .odt file showing what you want to do.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6649
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to link fields from xml to odt file to create condit

Postby raghava9247 » Sat Feb 16, 2019 4:33 am

Thanks for Reply.

Please find below example.

Xml
-----
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Named>Raghava</Named>
<MailingAddress>Bangalore</MailingAddress>
<LICNumber>123456</LICNumber>
<PolicyEffectiveFrom>03/19/2019 to 03/19/2019</PolicyEffectiveFrom>
</Configuration>

Template from Open office
---------------------------------

As individuals it is inherent to differ. Each individual's insurance needs and requirements are different from that of the others. LIC's Insurance Plans are policies that talk to you individually and give you the most suitable options that can fit your requirement.

LIC's Jeevan Pragati Plan is a non-linked, with - profits plan which offers a combination of protection and savings. This plan provides for automatic increase in risk cover after every five years during the term of the policy. In addition, this plan also takes care of liquidity needs through loan facility.

As individuals it is inherent to differ. Each individual's insurance needs and requirements are different from that of the others. LIC's Insurance Plans are policies that talk to you individually and give you the most suitable options that can fit your requirement.

--------------

conditions need to create like below:

Case 1:

If Name == "Raghava" middle paragraph should hide. Output like below

As individuals it is inherent to differ. Each individual's insurance needs and requirements are different from that of the others. LIC's Insurance Plans are policies that talk to you individually and give you the most suitable options that can fit your requirement.

As individuals it is inherent to differ. Each individual's insurance needs and requirements are different from that of the others. LIC's Insurance Plans are policies that talk to you individually and give you the most suitable options that can fit your requirement.

Case 2:

If Name not equal Raghava should not hide. Output like below.

As individuals it is inherent to differ. Each individual's insurance needs and requirements are different from that of the others. LIC's Insurance Plans are policies that talk to you individually and give you the most suitable options that can fit your requirement.

LIC's Jeevan Pragati Plan is a non-linked, with - profits plan which offers a combination of protection and savings. This plan provides for automatic increase in risk cover after every five years during the term of the policy. In addition, this plan also takes care of liquidity needs through loan facility.

As individuals it is inherent to differ. Each individual's insurance needs and requirements are different from that of the others. LIC's Insurance Plans are policies that talk to you individually and give you the most suitable options that can fit your requirement.

Kindly help me as early as possible
OpenOffice 4/windows10
raghava9247
 
Posts: 3
Joined: Fri Feb 15, 2019 7:43 am


Return to Writer

Who is online

Users browsing this forum: No registered users and 28 guests