WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#8471 closed enhancement (fixed)

make export/import output valid xml and parse xml using simplexml

Reported by: tott Owned by: westi
Milestone: 3.1 Priority: lowest
Severity: trivial Version: 2.7
Component: Export Keywords: needs-patch
Focuses: Cc:

Description

WXR Export as well as export.php script is not properly indented.

Attached is a small fix that produces well indented xml and improves readability in export.php script.

Attachments (2)

export-indent.diff (22.1 KB) - added by tott 12 years ago.
patch against rev 10020 indenting wxr exports as well as improving readbility in export.php
8471.r10258.diff (15.6 KB) - added by jacobsantos 12 years ago.
Based off of r10258

Download all attachments as: .zip

Change History (14)

@tott
12 years ago

patch against rev 10020 indenting wxr exports as well as improving readbility in export.php

#1 @lloydbudd
12 years ago

  • Owner changed from tott to westi

#2 @lloydbudd
12 years ago

  • Keywords has-patch added

#3 @jacobsantos
12 years ago

  • Keywords changed from export, indenting, formatting, wxr, has-patch to export indenting formatting wxr has-patch

#4 @jacobsantos
12 years ago

The phpdoc should not be indented. It is good as it is.

@jacobsantos
12 years ago

Based off of r10258

#5 @jacobsantos
12 years ago

  • Separates functions out of the export_wp() function.
  • indents the lines inside export_wp().


The problem is that since the import uses regular expressions, you can't really change the indentation without correcting the importer as well. When the importer switches over to using XML, then it can be done.

#6 @Denis-de-Bernardy
11 years ago

  • Keywords needs-patch added; export indenting formatting wxr has-patch removed
  • Milestone changed from 2.8 to Future Release
  • Severity changed from normal to trivial
  • Summary changed from WXR Export formatting to make export/import output valid xml and parse xml using simplexml
  • Version set to 2.7

#7 @hakre
11 years ago

-1 for SimpleXML, +1 for DOM-XML. Just to save us some headaches then.

#8 @hakre
11 years ago

see also #9633.

#9 @link92
11 years ago

Equally see #7400.

#10 @hakre
11 years ago

Maybe even drop DOM-XML because SimplePie uses XML Parser Functions: http://us2.php.net/manual/en/ref.xml.php

Those are PHP4 as well.

#11 @nacin
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15961]) Importer and exporter overhaul, mega props duck.

Exporter overhaul:

  • Add author information to export
  • Greater usage of slug identifiers
  • Don't export auto-drafts, spam comments, or edit lock/last meta keys
  • Inline documentation improvements
  • Remove filtering for now (@todo)
  • Bump WXR version to 1.1, but remain back compat in the importer

Importer overhaul (http://plugins.trac.wordpress.org/changeset/304249):

  • Use an XML parser where available (SimpleXML, XML Parser)
  • Proper import support for navigation menus
  • Many bug fixes, specifically improvements to category and custom taxonomy handling
  • Better author/user mapping

Fixes #5447 #5460 #7400 #7973 #8471 #9237 #10319 #11118 #11144 #11354 #11574 #12685 #13364 #13394 #13453 #13454 #13627 #14306 #14442 #14524 #14750 #15055 #15091 #15108.

See #15197.

#12 @nacin
10 years ago

  • Milestone changed from Future Release to 3.1
Note: See TracTickets for help on using tickets.