Jump to content

[SOLVED] How to get the value of an XML Header Element?


neo777ph

Recommended Posts

Notice the example XML Spreadsheet below:

 

<?xml version="1.0"?>

<?mso-application progid="Excel.Sheet"?>

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"

xmlns:o="urn:schemas-microsoft-com:office:office"

xmlns:x="urn:schemas-microsoft-com:office:excel"

xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"

xmlns:html="http://www.w3.org/TR/REC-html40">

<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">

  <Title>Vendor Batch Upload</Title>

  <LastAuthor>eniogui</LastAuthor>

  <Created>2007-08-28T05:54:25Z</Created>

  <Version>11.8132</Version>

</DocumentProperties>

<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">... And So and so forth..

 

I  tried to get the Value of Element "Title" in this case the value would be "Vendor Batch Upload", I had already tried using the following codes below..but no success..please help..

<?php

$doc = new DOMDocument();

$doc->load($filedir);

 

$docheaders = $doc->getElementsByTagName( 'DocumentProperties' );

$test =$docheaders->getElementsByTagName(Title);

echo $test->nodeValue;

?>

No output.. => pls help me..

thank you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.