943,708 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 3433
  • PHP RSS
Sep 9th, 2008
0

Bullet creation in xml using PHP

Expand Post »
If anybody could let me know how to create a bullet in an xml file using php. This piece of knowledge will be highly appreciated.

Thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rahejapreeti is offline Offline
3 posts
since Sep 2008
Sep 9th, 2008
0

Re: Bullet creation in xml using PHP

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
Reputation Points: 395
Solved Threads: 192
Veteran Poster
darkagn is offline Offline
1,136 posts
since Aug 2007
Sep 10th, 2008
0

Re: Bullet creation in xml using PHP

Thats correct, i need an ordered list only, prefixed by a bullet. yes, we can manually put a code (&#x2022 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 (&#x2022 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


Click to Expand / Collapse  Quote originally posted by darkagn ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rahejapreeti is offline Offline
3 posts
since Sep 2008
Sep 12th, 2008
0

Re: Bullet creation in xml using PHP

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rahejapreeti is offline Offline
3 posts
since Sep 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: About Login Page Pbm
Next Thread in PHP Forum Timeline: Flash + PHP Sockets





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC