Read XML in PHP

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
samudaya
Forum Newbie
Posts: 2
Joined: Thu Aug 21, 2008 3:05 am

Read XML in PHP

Post by samudaya »

Hi,
I have two problems regarding the xml reading in the php.

1.How to read attribute values in tags
<c r="A1" s="5" t="s">
<v>0</v>
</c>

I want to identify the values assigned to “t” in tag <c> as the string ‘s’. How to do this in php?



2.What are the meaning of “:” separation inside the tag

<table:table table:name="Sheet1" table:style-name="ta1" table:print="false">
<table:table-column table:style-name="co1" table:number-columns-repeated="4" table:default-cell-style-name="Default"/>
<table:table-row table:style-name="ro1">
<table:table-cell office:value-type="string">
<text:p>A</text:p>
</table:table-cell>
</table:table-row>
</table:table>


I can’t understand the tag names. When I used the whole name it gives a error regarding the “:”. Is that whole name, or what are the tag names?
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Read XML in PHP

Post by it2051229 »

You can extract some informations from XML.. PHP has an Simple XML parser or something.. search it in google and read the manual on how to achieve this
Post Reply