<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3" -->

---
title: OpenXML in Healthcare in PHP | daily.dev
description: A PHP developer ports part of a Microsoft MSDN article on OpenXML in Healthcare into PHP, demonstrating how to extract embedded custom XML data from a Word...
canonical: https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: OpenXML in Healthcare in PHP | daily.dev
og:description: A PHP developer ports part of a Microsoft MSDN article on OpenXML in Healthcare into PHP, demonstrating how to extract embedded custom XML data from a Word...
og:url: https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3
og:image: https://api.daily.dev/og/posts/CzjSkC0p3.png
og:image:alt: OpenXML in Healthcare in PHP
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenXML in Healthcare in PHP

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 2 min read · 0 upvotes · 0 comments

## Summary

A PHP developer ports part of a Microsoft MSDN article on OpenXML in Healthcare into PHP, demonstrating how to extract embedded custom XML data from a Word 2007 document. The scenario involves a central medical records system where physicians fill out a Word document containing custom XML, which is then uploaded and parsed to extract patient data. The writeup walks through locating the main relationships part of the OpenXML package, finding the document part, and identifying the custom XML relationship type, skipping the document-signing portion due to time constraints. A live demo and downloadable sample code are provided.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2007-10-26-openxml-in-healthcare-in-php>

## Questions this post answers

### How do I extract custom XML data embedded in a Word 2007 OpenXML document using PHP?

Locate the main relationships part in the OpenXML package, then find the main document part from it. Loop over the relationships tied to that document part and look for one with type http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml. Once found, parse the referenced XML document to retrieve the embedded data.

_See a working PHP example and sample code for extracting OpenXML custom data through daily.dev's developer resources._

## Similar posts on daily.dev

- [C\# Word Library: Comparing 7 Options for .NET Developers in 2026](https://daily.dev/posts/c-word-library-comparing-7-options-for-net-developers-in-2026-jkwjw3mgg) · C\# Corner · 2 upvotes · 1 comments
- [7 Document Automation Tasks Every .NET Application Should Handle Server-Side](https://daily.dev/posts/7-document-automation-tasks-every-net-application-should-handle-server-side-uiswgvw62) · Syncfusion · 4 upvotes · 0 comments
- [How proprietary formats have become Microsoft’s main tool for lock-in](https://daily.dev/posts/how-proprietary-formats-have-become-microsoft-s-main-tool-for-lock-in-7v96hniud) · Hacker News · 2 upvotes · 2 comments
- [Load, Access, Convert with Document Processing Libraries](https://daily.dev/posts/load-access-convert-with-document-processing-libraries-8lmuvapzq) · Telerik · 1 upvotes · 0 comments
- [Your Word Documents Are Full of Text You Never Meant to Extract](https://daily.dev/posts/your-word-documents-are-full-of-text-you-never-meant-to-extract-emsggnn1h) · Medium · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#healthcare](https://daily.dev/tags/healthcare)

[View this post on daily.dev](https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"OpenXML in Healthcare in PHP","url":"https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3"},"datePublished":"2026-10-04T13:05:03.988Z","dateModified":"2026-10-04T13:10:29.203Z","description":"A PHP developer ports part of a Microsoft MSDN article on OpenXML in Healthcare into PHP, demonstrating how to extract embedded custom XML data from a Word...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f1599680214613c078f87784dcaa0d69?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f1599680214613c078f87784dcaa0d69?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,healthcare","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"OpenXML in Healthcare in PHP"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/openxml-in-healthcare-in-php-czjskc0p3#faq","mainEntity":[{"@type":"Question","name":"How do I extract custom XML data embedded in a Word 2007 OpenXML document using PHP?","acceptedAnswer":{"@type":"Answer","text":"Locate the main relationships part in the OpenXML package, then find the main document part from it. Loop over the relationships tied to that document part and look for one with type http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml. Once found, parse the referenced XML document to retrieve the embedded data. See a working PHP example and sample code for extracting OpenXML custom data through daily.dev's developer resources."}}]}
```

