WordPress eXtended Rss (WXR)文件格式解析

Sina2WordPress的第一步——解析WXR文件格式

WXR是Wordpress eXtended Rss的缩写,是WordPress针对博客信息特意设定的格式,它最大的优点是兼容性好,包含信息丰富

通过参照导出的文件,初步找到一个完备集(见下方代码),经测试在WP无任何内容情况下无信息缺漏错误现象

下方代码已经尽可能的注释了所有可能的标签和属性,并且由于一些标签和属性与Sina2WordPress关系不大,故未深究

[xml]
< ?xml version="1.0" encoding="UTF-8" ?>



Blog Title
http://blog.example.com
Blog Description
Dec, 20 Jun 2012 23:59:59 +0000
en

1.1

http://example.com

http://blog.example.com

1admin_testadmin@example.org< ![CDATA[AdMin test]]>< ![CDATA[AdMin]]>< ![CDATA[test]]>

1category_test< ![CDATA[分类测试]]>

2tag_test< ![CDATA[标签测试]]>

http://wordpress.org/?v=3.1.3


Title
http://blog.example.com/title/ Thu, 15 Apr 2010 23:20:03 +0000
admin

http://blog.example.com/?page_id=1


< ![CDATA[Content_test_1]]>

< ![CDATA[]]>

2

2012-12-21 07:59:5

2010-12-20 23:59:59

open

closed

blog_title

publish

0

0

post



0

< ![CDATA[Tag Test]]>
< ![CDATA[Category]]>


_edit_last

< ![CDATA[1]]>


1

< ![CDATA[anonymous]]>>

anonymous@anonymous.com

http://blog.anonymous.com

8.8.8.8

2012-12-21 07:59:59

2012-12-20 23:59:59

< ![CDATA[Content of Comment]]>

1



0

0





[/xml]

参考:http://ipggi.wordpress.com/2011/03/16/the-wordpress-extended-rss-wxr-exportimport-xml-document-format-decoded-and-explained/

One thought on “WordPress eXtended Rss (WXR)文件格式解析”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.