简体   繁体   中英

how to read and pass the variables from xml file to php script

How can i read and pass the variables which are coming in through an xml file as an input to a php file ?

Scenario is my COM object pulls data from an application, i need to pass this information to a php script. How can i do this ? Can i use xml to pass this info to a php file which is called by initiating a web browser.

Any inputs will be really appreciated.

php provides you with easy to use basic XML-handling. check:

simpleXML

Basic logic:

generate your XML

pass xml file path to php

let simplexml do the parsing

hth

k

See this link http://us3.php.net/manual/en/refs.xml.php for all kinds of ways PHP can parse XML. They are:

# DOM
# DOM XML (PHP 4)
# libxml
# qtdom
# SDO
# SDO-DAS-Relational
# SDO DAS XML
# SimpleXML
# WDDX
# XML Parser
# XMLReader
# XMLWriter
# XSL
# XSLT (PHP4)

SimpleXML is one of the simplest, indeed but it sometimes is to simple and can't handle more advanced manipulation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM