<IP>
<FamilyName>Бараненко</FamilyName>
<FirstName>Виктор</FirstName>
<SecondName>Александрович</SecondName>
<OGRNIP>321246800128899</OGRNIP>
<PostAddress>
<Country>Россия</Country>
<Region>24</Region>
<PostIndex>660000</PostIndex>
<City>Красноярск</City>
</PostAddress>
</IP>
<xsl:template match="IP">
<span class="field">Индивидуальный предприниматель: </span>
<xsl:value-of select="FamilyName"/>
<xsl:text> </xsl:text>
<xsl:value-of select="FirstName"/>
<xsl:text> </xsl:text>
<xsl:value-of select="SecondName"/>
<br/>
<span class="field">ОГРНИП: </span>
<xsl:value-of select="OGRNIP"/>
<br/>
<xsl:if test="Email">
<xsl:if test="Email != ''">
<span class="field">Адрес электронной почты: </span>
<xsl:value-of select="Email"/>
<br/>
</xsl:if>
</xsl:if>
<span class="field">Адрес: </span>
<xsl:apply-templates select="PostAddress"/>
</xsl:template>
<span class="field" style="font-weight: bold;">Индивидуальный предприниматель: </span>Бараненко Виктор Александрович<br><span class="field" style="font-weight: bold;">ОГРНИП: </span>321246800128899<br><span class="field" style="font-weight: bold;">Адрес: </span>660000, Россия, Красноярский край, Красноярск
<City>Красноярск</City>
<City><span data-tag_id="108">Красноярск</span></City>
public function htmlToWord(Request $request) {
\PhpOffice\PhpWord\Settings::setTempDir(public_path());
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$html = "Код для теста <";
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html);
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord);
$objWriter->save("TEST.docx");
}
public function htmlToWord(Request $request) {
\PhpOffice\PhpWord\Settings::setTempDir(public_path());
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$html = "Код для теста <";
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html);
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord);
$objWriter->save("TEST.docx");
}