Hi friends i have basic knowledge of xml coding but i am not able to relate it with live project , I want to know exactly how can xml can help me in my webdesigning , usually i use php for server side programming . What things are possible using xml or where and how i should use xml in my projects ?
How XML is Useful in Web Development
Collapse
X
-
Tags: None
-
XML is a good place to store some settings.
With .Net based application, the settings are stored in a .config file, which is basically an xml file.
things like connection string, any constant strings, user settings, etc can be stored as it acts as a central repository for that and can be changed withouth having to go inside the code.
I even once created an online help document in xml, and use xsl to transform them to html, which meant that i could seperate design and data from each other completely and could change the style anytime i wanted.
But in general XMl is a good place to store settings and other values which are used in the code -
-
I havent used php,
but even php would need connection strings
maybe you can even store all the sql strings in it
[CODE=xml]<configuratio n>
<sql>
<sqlString id="select_user " value="select * from users"/>
<sqlString id="delete_user " value="delete from user where user_id = {0}"/>
</sql>
<connectionStri ngs>
<connectionStri ng id="myDatabase " value="datasour ce=(local);user =admin;pwd=1234 "/>
</connectionStrin gs>
</configuration>[/CODE]
{0} is a .Net specific place holder . I am not aware if php has an equivalent to itComment
Comment