Open skwi opened 9 years ago
have you try to parse your xml online ? http://www.freeformatter.com/xml-formatter.html maybe it could be a helper :)
I've got : Unable to parse any XML input. org.jdom2.input.JDOMParseException: Error on line 1: The prefix "w" for element "w:p" is not bound.
The xml was generated by Office Word (and the file is properly opened, even after PHPWord manipulation) so I don't think it's badly formated.
w:p
tags seems to be a valid OpenXML word, event if it's not valid in freeformater
I manage to make it work by removing the (<\?xml.*)
part of the regex in the TemplateProcessor::replaceBlock method.
It looked like a line break at the beginning of the file made the regex fail. I edited the document with Word 12 on Mac OS 10.10, maybe that the reason for this failing line break.
I am going to work on a fork to se if I can come to a "clean" regex working with my document but keeping the (<\?xml.*)
.
Duplicate of #316
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue for you, please try to help by debugging it further and sharing your results. Thank you for your contributions.
Hello,
I have a non matching case in TemplateProcessor::replaceBlock method regular expression.
In the template document I use, it does not match the tag. Here is a sample of the document where you can see the tag.
The tag in the document is
${ENSEMBLE_PERSONNEL} [...] ${/ENSEMBLE_PERSONNEL}
I guess it's related to all the XML tags that Word inserted in the document but the template will be created by non technical users so I can tell them to fix it in the XML.