Help send html to xwiki page

I am a complete newbie to code, I really need help with loading html content. This is my put request:
PUT http://localhost:8080/rest/wikis/xwiki/spaces/Main/pages/Test2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<page xmlns="http://www.xwiki.org">
 <link rel="http://www.xwiki.org/rel/space" href="http://localhost:8080/rest/wikis/xwiki/spaces/Main"/>
 <version>1.1</version>
 <majorVersion>1</majorVersion>
 <minorVersion>1</minorVersion>
 <created>2009-03-21+01:00</created>
 <creator>XWiki.EkaterinaKirillova</creator>
 <modified>2021-09-14+09:00</modified>
 <modifier>XWiki.EkaterinaKirillova</modifier>
 <title>test</title>
<content>Hello world</content>
</page>

How can I send html content instead of “Hello world” content? Please help me very much

PS html content (example) <p><a href="https://www.youtube.com/watch?v=wLS4btpXEFY" class="external-link" rel="nofollow">link</a></p><p>my</p>

Hi, see https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI for more details.

You don’t send HTML content but wiki page content which depends on the syntax of the page.

Thanks, but your answer is not clear to me. In my request only a fragment from html is given. If it’s not difficult for you please show an example of how I can send html content to wiki page. I will be very grateful to you

I don’t understand what the intended function is.

Is it about

  • to get occasional HTML input into a wiki page at all:
    Then you can copy-paste the desired piece of HTML from browser window into the WYSIWIG editor.

  • to transfer HTML output, which is available in some file e.g. as program output, automatically into the XWiki and then display it.

    Then it becomes more complicated or even impossible, especially regarding Javascript and dynamic parts. Whether the result is then any good depends on whether there are references to Javascript / CSS, which are then missing

    A part of the HTML body can be transferred to the XWiki by means of via the REST interface.

..
<content>{{html clean="false"}} HTML content {{/html}}</content>
..
  • If you just want to save the HTML in the XWiki, you can store it as an attachment. But HTML code of a page is actually never the complete information because of external references to images, etc.

  • If a manual intervention is allowed:
    one could define a in the XWiki, which first uploads the HTML code via “file upload” and then processes it appropriately. (Example for something like this is an upload of a CSV file, which is automatically transformed into an XWiki table).

What is it about?

My task is to collect content from the confluence weekly and transfer it to the wiki.

<p><a href="https://www.youtube.com/watch?v=wLS4btpXEFY" class="external-link" rel="nofollow">link</a></p><p>my</p>

This is an example of the page content retrieved from confluence in html format.

Unfortunately I can’t figure out why it works

<content>{{html clean="false"}} HTML content {{/html}}</content>

but it doesn’t work

<content>{{html clean="false"}} 
<table>
  <tr>
    <td>
      * listitem
    </td>
  </tr>
</table>
{{/html}}</content>

Explain to me please

Sorry, I forgot to mention, that the HTML content has to be XML encoded
especially

"<"   as  "&lt;"

to avoid conflicts with other XML tags.

You can get an impression how it looks like if you append an “?xpage=xml” to a “view”-Link of a Wiki file.

Thanks for your help it helped me!