| | |
Bullet creation in xml using PHP
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi rahejapreeti and welcome to DaniWeb 
By a bullet, do you mean an ordered list? Do you know how to do that in XML (without php)? If so, let me point you in the direction of the Simple XML documentation. Simple XML provides an easy-to-use XML manipulation for PHP.
Hope this helps,
darkagn

By a bullet, do you mean an ordered list? Do you know how to do that in XML (without php)? If so, let me point you in the direction of the Simple XML documentation. Simple XML provides an easy-to-use XML manipulation for PHP.
Hope this helps,
darkagn
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend. •
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 0
Thats correct, i need an ordered list only, prefixed by a bullet. yes, we can manually put a code (•
for bullet in an xml file but through php if i append the code as string with the node, it gets converted to (&#x2022
in the generated xml file and in the browser appears as (•
instead of a bullet. i am using DOMDocument class to generate XML . could you tell me how to delete this (amp
from the code (&#x2022
in the newly generated xml file , may be by using simpleXML.
Thanks and Regards
for bullet in an xml file but through php if i append the code as string with the node, it gets converted to (&#x2022
in the generated xml file and in the browser appears as (•
instead of a bullet. i am using DOMDocument class to generate XML . could you tell me how to delete this (amp
from the code (&#x2022
in the newly generated xml file , may be by using simpleXML.Thanks and Regards
•
•
•
•
Hi rahejapreeti and welcome to DaniWeb
By a bullet, do you mean an ordered list? Do you know how to do that in XML (without php)? If so, let me point you in the direction of the Simple XML documentation. Simple XML provides an easy-to-use XML manipulation for PHP.
Hope this helps,
darkagn
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 0
Hey Everyone !
Found the solution for the problem.... firstly i stored the xml string generated using domobject->saveXML() to a variable say $str. used str_replace('amp;', '',$str) and stored the resulting string in a new variable say $newstr. And then used that string to write a file using the following code:
$result_xml = '../data/mainmenu.xml';
if(!file_exists($result_xml))
system("touch ".$result_xml);
$xmlfile_xml = fopen($result_xml,"w");
fwrite($xmlfile_xml,$newstr);
fclose($xmlfile_xml);
And the problem got solved.
Thanx
Found the solution for the problem.... firstly i stored the xml string generated using domobject->saveXML() to a variable say $str. used str_replace('amp;', '',$str) and stored the resulting string in a new variable say $newstr. And then used that string to write a file using the following code:
$result_xml = '../data/mainmenu.xml';
if(!file_exists($result_xml))
system("touch ".$result_xml);
$xmlfile_xml = fopen($result_xml,"w");
fwrite($xmlfile_xml,$newstr);
fclose($xmlfile_xml);
And the problem got solved.
Thanx
![]() |
Other Threads in the PHP Forum
- Previous Thread: About Login Page Pbm
- Next Thread: Flash + PHP Sockets
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax alerts apache api array beginner binary broken cakephp checkbox class cms code convert cron curl database date directory display download dynamic echo email error file files folder form forms function functions google hack href htaccess html htmlspecialchars image include insert integration ip java javascript joomla limit link login loop mail menu methods mlm mod_rewrite multiple mysql network object oop overwrite parse paypal pdf php problem query radio random recursion redirect regex remote script search securephp server sessions sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video web xml youtube





