Module

Archived
Forum
(read-only)

Charlie Hawker does not actively monitor this forum
(but you can still get help from other EE users).

Weblog Entries Exporter

ExpressionEngine 1.x

Back to this add-on's main page
View Other Add-ons From Charlie Hawker

     

You must be logged in to post.

Weblog Entries Exporter XML Validation

General

Luke McReynolds
Luke McReynolds

Continued over from http://expressionengine.com/forums/viewthread/171060/

I’m having trouble importing XML files produced by this plugin in to DataGrab for EE2. Running the XML files generated by this module throws up a fair number of errors, and I’m betting that that’s the problem there.

CSV export with Weblog Entries Export works great, as does the import in to EE2 w/ Datagrab. I just wish I could export/import the comments with CSV also.

XML validation failed when I tested it at http://www.w3schools.com/xml/xml_validator.asp. Depending on which weblog export I tested, different errors popped up, but they each had something to to with HTML character entities being interpreted incorrectly and breaking validation.

Charlie Hawker
# 1
Developer
Charlie Hawker

Thanks for highlighting this. I had tested on some different sites and weblogs, but it had validated each time. I can now see validation errors on weblogs with a certain amount of HTML code in them and will release a fix ASAP to resolve this.

Charlie

Luke McReynolds
# 2
Luke McReynolds

Awesome. Thank you for that. :-)

Charlie Hawker
# 3
Developer
Charlie Hawker

Luke, good news! Think this should be resolved now. I’ve just released version 1.2.

I’ve started using the SimpleDOM module, which extends PHP’s built in SimpleXML but allows CDATA to be used. This now validates because HTML get’s wrapped by the CDATA tag, which is valid XML markup.

Let me know if it solves your issues with importing data via DataGrab in EE2.

All the best.

Luke McReynolds
# 4
Luke McReynolds

Wow, you’re quick. :-)

The XML still doesn’t validate, at least for me: running it through a validator says that the XML document root needs a declaration.

# Target: file:/usr/local/XSV/xsvlog/tmp1GkcDBuploaded
  (Real name: bates.xml)
# docElt: {None}entries
# No declaration for document root found, validation was lax
# The schema(s) used for schema-validation had
  no errors
# No schema-validity problems were found in the target

All the ampersand and equal sign HTML char entity issues are gone now though. :-)

After updating the module, I made a new export and tried importing it in to Datagrab. I go the same error as before.

Thank you so much for your responsiveness and for your help.

Charlie Hawker
# 5
Developer
Charlie Hawker

What is the error you’re getting from DataGrab Luke? I doc root declaration if need’s be but I doubt that’s causing your issue. I suspect if you run the XML through W3C’s XML validator you get a valid result, with a handful of warnings?

Luke McReynolds
# 6
Luke McReynolds

I get

Error: Cannot read the XML from file/url: /home/site/public_html/imports/xmlfile.xml

There are 0 fields per entry.

It’s also entirely possible that the problem is on DataGrab’s end. I’ll investigate more tomorrow.

Charlie Hawker
# 7
Developer
Charlie Hawker

Luke, I found this which seems to be the same issue as you’re reporting, but in this case it is the Wordpress export XML causing issues. I’ll continue to investigate anyway.

http://brandnewbox.co.uk/forums/viewthread/133/

Charlie Hawker
# 8
Developer
Charlie Hawker

Luke, did you investigate further at all? I’d be interested to help you further with this if I can.