inpsyde / wpml2mlp

Convert posts from an existing WPML multilingual site via WXR Export/Import for MultilingualPress
https://wordpress.org/plugins/wpml-to-multilingualpress/
GNU General Public License v2.0
10 stars 6 forks source link

Importer: XML-Parsing #25

Open derpixler opened 8 years ago

derpixler commented 8 years ago

The following structures has to be read out of the XML-File:

The interface format of the entities…

User

Attributes:

 int:    origin_user_id
 string: name
 string: email
 string: display_name
[string: first_name]
[string: last_name]
[object: roles]

[]… maybe empty values roles has to be defined later

Terms

Attributes:

 int:    origin_term_id
 string: taxonomy
 string: name
 string: slug
[string: description]
[int:    origin_parent_term_id]
[array:  locale_relations]

Term locale relations

 int:      origin_post_id
 string:   locale

Posts

Attributes:

 int:      origin_post_id
 string:   post_title
 string:   post_guid
 DateTime: post_date
 string:   comment_status
 string:   ping_status
 string:   post_status
 string:   post_type
 bool:     is_sticky
[string:   origin_link]
[string:   post_excerpt]
[string:   post_content]
[string:   post_name]
[int:      origin_post_parent_id]
[int:      menu_order]
[string:   post_password]
[array:    terms]
[array:    meta]
[array:    locale_relations]

Post meta

Attributes:

 string:   meta_key
 mixed:    meta_value

Post terms

Attributes:

 int:      origin_term_id
 string:   taxonomy
 string:   name
 string:   slug

Post locale relations

Attributes:

 int:      origin_post_id
 string:   locale

Comments

Attributes:

  int         origin_post_id
  string      author_name
  string      author_email
  string      author_url
  string      author_ip
  DateTime    date
  string      content
  int         karma
  string      approved
  string      agent
  string      type
  int         origin_user_id
  int         origin_parent_comment_id
  array       meta