Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7787757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:46:18+00:00 2026-06-01T20:46:18+00:00

I have an xml document (generated from msword 2010), which I am trying to

  • 0

I have an xml document (generated from msword 2010), which I am trying to process using simple xml.

Sample of xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 wp14">
<w:body>
    <w:p w:rsidR="005B1098" w:rsidRDefault="005B1098"/>
    <w:p w:rsidR="00F254A4" w:rsidRDefault="00F254A4"/>
    <w:p w:rsidR="00F254A4" w:rsidRPr="008475A1" w:rsidRDefault="00C15492" w:rsidP="008475A1">
        <w:pPr>
            <w:jc w:val="center"/>
            <w:rPr>
                <w:b/>
                <w:sz w:val="44"/>
                <w:szCs w:val="44"/>
            </w:rPr>
        </w:pPr>
        <w:r w:rsidRPr="008475A1">
            <w:rPr>
                <w:b/>
                <w:sz w:val="44"/>
                <w:szCs w:val="44"/>
            </w:rPr>
            <w:t>Test file</w:t>
        </w:r>
    </w:p>
    <w:p w:rsidR="00C15492" w:rsidRPr="008475A1" w:rsidRDefault="00C15492" w:rsidP="008475A1">
        <w:pPr>
            <w:jc w:val="center"/>
            <w:rPr>
                <w:sz w:val="20"/>
                <w:szCs w:val="20"/>
            </w:rPr>
        </w:pPr>
        <w:r w:rsidRPr="008475A1">
            <w:rPr>
                <w:sz w:val="20"/>
                <w:szCs w:val="20"/>
            </w:rPr>
            <w:t>another paragraph</w:t>
        </w:r>
    </w:p>
</w:body>
</w:document>

I am trying to open it using:

$content = '/reports/docx_templates/testing2.xml';
if(!$simple_xml = simplexml_load_file($content)){
    trigger_error('Error reading XML file',E_USER_ERROR);
} else {
    echo 'loaded';
}

And get the error:

Message: simplexml_load_file(): I/O warning : failed to load external entity " Test file another paragraph "

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:46:20+00:00Added an answer on June 1, 2026 at 8:46 pm

    I prefer the SimpleXMLElement Class.

    $xml = new SimpleXMLElement(file_get_contents($content));
    

    I have test it with your XML file and its working.

    Edit:

    here is a short tutorial to parse a word XML file: Word XML

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object which I have created from an XML document using visual
I have an XML document something like ::: <?xml version=1.0 encoding=utf-8?> <?mso-application progid=Excel.Sheet?> <Workbook
I have an XML document generated from an external application, but that application does
I have a relatively simple package of 8 Java classes generated from an XML
I have generated a set of classes using xsd.exe and created an XML document
I have an XML document generated by a 3rd party using BizTalk, and I
HI there, I have an xml that is dynamically generated, from which I want
I have an XML document that's being generated from some content that people are
I have an XML document that I generate from an Entity Framework object. The
I have an XML document that I'm trying to style via CSS. A relevant

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.