Forum Moderators: coopster

Message Too Old, No Replies

php with xml

         

Zenden

3:19 pm on Jul 1, 2005 (gmt 0)

10+ Year Member



Ok, php can be used with xml right?
but i need to use php to both substitute a tags content and to write another equal one (with diferent content) in the side of another.

can some1 help me?:

lobo235

4:45 pm on Jul 1, 2005 (gmt 0)

10+ Year Member



I have done some limited things with XML. I have not used any of the built-in support for XML that PHP has though. What I have done in the past is setup an XML template file with areas that I can easily replace with str_replace(). For example:


<TYPESOFLOSS>
<TYPEOFLOSS
deductible = "500"
blockModificationOfDeduct = "1"
blockModificationOfTOL = "1"
claimNumber = "77X%%CLAIM_NUM%%"
policyNumber = "77CC%%POL_5%%"
>
<TOL
desc = "%%TOL_D%%"
code = "%%TOL_C%%"
/>
</TYPEOFLOSS>
</TYPESOFLOSS>

This is probably not the best way to do things but it is the quickest way to do it without teaching yourself XML.

Hope this helps.