How to import into confluence with xml files (some html labels was embeded with [cdata])?
Asked by linqiang:

How to import into confluence with xml files (some html labels was embeded with \[cdata\])?

I used the default UWC with wiki type "tesxml", but the \[cdata\] part were not formatted as html.

if used the wiki type "media wiki" (with default configure), many errors occur?

what should i do?

thanks in advance.


Answers:
author: linqiang
body: i have import it with some minor modification of original xml files.

but another issues, how to import the image file in \<img src xxx\> of html file when used uwc to convert from html into confluence ? as u know images are confluce-embedded-image class.

thanks in advance.


author: linqiang
body: thanks for your quick response.

hi, as far as i know, it maybe mediawiki exported xml format, the header part like below.

hope to get more help from you.

\<disease\>  
\<name\>??\</name\>  
\<tableOfContents\>  
\<string\>??\</string\>  
\<string\>??\</string\>  
\<string\>???????\</string\>  
\<string\>????\</string\>  
\<string\>??\</string\>  
\<string\>????\</string\>  
\<string\>??\</string\>  
\<string\>??\</string\>  
\</tableOfContents\>  
\<content\>\<!\[CDATA\[\<h2\>??\</h2\>\<p\>????????????????????????????????????50????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????10?20?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<h2\>??\</h2\>\<p\>\<strong\>1.??\</strong\>\</p\>\<p\>?????????????????????????3000???????????????????????????????????????????????????????????????????DNA??????????Ras????????????p53?FHIT??????????????????????\</p\>\<p\>\<strong\>2.???????\</strong\>\</p\>\<p\>????????????????10%?????????????????????9??????????????????????????????bis-chloromethylether???????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>3.????\</strong\>\</p\>\<p\>?????????????????????????????Schneeberg-joakimov???????????????????????????????????????????????????70%?80%??????????????????????????????10?45???????25?????????38??????????????120??????WLM?????????????1800WLM???????20?30???????????????????????????????????????????????Beebe?????????????????????????1400m????????1400?1900m?2000m??????????????????\</p\>\<p\>\<strong\>4.????????\</strong\>\</p\>\<p\>????????????????????????????????????????????????\</p\>\<p\>\<strong\>5.?????\</strong\>\</p\>\<p\>????????????????????????????????????????????????????????????????????????/??????????\</p\>\<p\>\<strong\>6.????\</strong\>\</p\>\<p\>??????????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<h2\>???????\</h2\>\<p\>\<b\>1.????\</b\>\</p\>  
\<p\>??????????????????????????????????????????????????????????????????\</p\>  
\<p\>\<b\>2.????\</b\>\</p\>  
\<p\>????????????????????????????????????????????????????\</p\>  
\<p\>\<b\>3.?????\</b\>\</p\>  
\<p\>???????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<h2\>????\</h2\>\<p\>?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<p style="line-height:2em"\>\<strong\>\<span style="font-size:18px"\>???????\</span\>\</strong\>\</p\>\<p\>?????????????????????????????????????\</p\>\<p\>\<strong\>1.??\</strong\>\</p\>\<p\>????????????????????35%?75%????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>2.???????\</strong\>\</p\>\<p\>???????????????????????????30%????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>3.??\</strong\>\</p\>\<p\>???????????25%????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????25%????????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>4.?????\</strong\>\</p\>\<p\>??10%?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????/???????????????????????????????????????????????????????????????????????????COPD?\</p\>\<p\>\<strong\>5.????\</strong\>\</p\>\<p\>?5%?18%?????????????????????????????????????????????????????????????????????????????\</p\>\<p style="line-height:2em"\>\<strong\>\<span style="font-size:18px"\>???????\</span\>\</strong\>\</p\>\<p\>\<strong\>1.??\</strong\>\</p\>\<p\>????????20%?30%???????????????????????????????????????????????????????????????????????38????????39????????????????????????????????????1/3????????????????????????????????????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>2.??????\</strong\>\</p\>\<p\>????????????????????????????????????TNF?Leptin??????????????????????????\</p\>\<p style="line-height:2em"\>\<strong\>\<span style="font-size:18px"\>???????\</span\>\</strong\>\</p\>\<p\>?????????????????????????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>1.?????????\</strong\>\</p\>\<p\>????????????????????????????????????????????????????????????????????????????????29%??????????????????1%?10%??????????????????????????????????????????????????????????????????????????\</p\>\<p\>\<strong\>2.???????????????\</strong\>\</p\>\<p\>?10%??????????????????????????????????


author: Mirko Skramusky
body: Hi!

What's the source of you XML file? Do you export it from another Confluence? In this case you can import ist via the Confluence administration \> backup and restore. If you use other sources it's somewhat ticky and needs some time of configuring the UWC and reimporting.


Tags: universal-wiki-converter

xml