How to prevent PHP: XSLTP processor from generating <html> and <body> tags?

I am using php XSLTProcessorto convert some parts of an XML file that I need to include as content inside another HTML document.

The problem is that it XSLTProcessoralways emits such code:

<head>
<body>
[what I need to incorporate]
</body>
</head>

I need to prevent the creation of this environment, how can I do this?

+3
source share
1 answer

Have you tried not to use the output method html?

I would try:

<xsl:output method="xml"/>

XSLT- XMLWriter, , (, , <br /> <br></br>), .

+3

Source: https://habr.com/ru/post/1781111/


All Articles