Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#8471 closed enhancement (fixed)

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

Reported by: tott Owned by: westi
Priority: lowest Milestone: 3.1
Component: Export Version: 2.7
Severity: trivial Keywords: needs-patch
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 4 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 4 years ago.
Based off of r10258

Download all attachments as: .zip

Change History (14)

tott4 years ago

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

  • Owner changed from tott to westi
  • Keywords has-patch added
  • Keywords changed from export, indenting, formatting, wxr, has-patch to export indenting formatting wxr has-patch

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

Based off of r10258

  • 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.

  • 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

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

see also #9633.

Equally see #7400.

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.

  • 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.

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