IT Community - Software Programming, Web Development and Technical Support

XML to php posting issue

This is a discussion on XML to php posting issue within the XML and SOAP forums, part of the Web Development category; Hi, Issue is when posting xml from one url to another url: While anybody posting xml with "&" ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > XML and SOAP

Register FAQ Members List Calendar Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-20-2007, 04:57 AM
venkatesan.N venkatesan.N is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 11
venkatesan.N is on a distinguished road
Thumbs up XML to php posting issue

Hi,

Issue is when posting xml from one url to another url:

While anybody posting xml with "&" in any attributes values we are not getting the full xml. i.e Xml attributes is lost after "&". Is there any solution in PHP to avoid this issue and get full xml.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-02-2007, 11:16 PM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: XML posting issue to php

Hi,
we can solve this by using php configuration. By default the argument specifier is & , we can change to any character in php.ini file for the mentioned directive .

arg_separator.input = ";&"
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-03-2007, 12:26 AM
jegan jegan is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Posts: 161
jegan is on a distinguished road
Red face Re: XML posting issue to php

Hi Vivekanandan,

Thanks for ur post.

The idea is nice, but what is the probability if that new character wont come in XML. Then it would also cause a major problem.

I think the function file_get_contents would be useful for this.

Can any one explain about this function??
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-03-2007, 01:58 AM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: XML posting issue to php

Hi,
fine, the probability is notes depends upon the application we are using,
but when u use special character like these },{,|,. we will get low priority and make the application scalable.

we have another good solution is file_get_contents('php://input') which
works fine for the all suitation.

Regards,
vivekanandan.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-03-2007, 03:11 AM
venkatesan.N venkatesan.N is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 11
venkatesan.N is on a distinguished road
Thumbs up Re: XML posting issue to php

Hi vivek

Thanks. I checked and it works fine.

But in some of the php pages we have given navigation links as below

http://xxx.com/test.php?test=1&val=2

So when i use your logic then i need to find and replace in all pages.it will be tedious.

Is there a way to change php.ini file for a particular page?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-03-2007, 03:54 AM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: XML posting issue to php

Hi Venkatesan,
Yes, it is difficult for the Older application, but php provides dynamic php configuration using ini_set function which over rides the php configuration. we can use it any page as we need.


Regards,
Vivekanandan.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-16-2007, 04:59 AM
venkatesan.N venkatesan.N is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 11
venkatesan.N is on a distinguished road
Thumbs up Re: XML posting issue to php

Hi Vivek

ok. Its better if you give me an sample example to post and set in php file.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-20-2007, 10:55 PM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: XML posting issue to php

Hi ,
For changing the delimeter & to ~ , we can run this code as follows

ini_set("arg_separator.input",";~");

Regards,
Vivekanandan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-21-2007, 05:28 AM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 803
vadivelanvaidyanathan is on a distinguished road
Default Re: XML posting issue to php

Vivek,

This issue browser dependent or independent. If data having double quotes within tag then XML will generate or not?
__________________
V.Vadivelan

There never a wrong time to do the right thing.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 08-23-2007, 10:55 PM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: XML to php posting issue

Hi Vadivelan,
Browser is just xml viewer. Every thing is depend on the XML and the usage of it.
Note:
we use attribute to mention common for all child tags in it, Here school name is rama krishna, when we metion double quoto inside value,it is meaning less as follows
name="rama" krishna", how


XML data

<info>
<school name="rama krishna">
<student>
<name>vivek</name>
<age>20</age>
</student>
<student>
<name>velan</name>
<age>21</age>
</student>
</school>
</info>


Regards,
vivekanandan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 09-06-2007, 08:21 AM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: XML to php posting issue

Hi,
This is tips for searching the xml content fastly by using Xpath mainly used in stype sheet.


$oDomDoc = new DomDocument;
$oDomDoc->loadXML($str);
$xpath = new DOMXPath($oDomDoc);
$xpath->preserveWhiteSpace = false;
$result = $xpath->query("//Root/Element");
foreach($result as $node )
{
print "<br>". $node -> getAttribute("Name");
}

Regards,
vivekanandan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/xml-soap/2311-xml-php-posting-issue.html
Posted By For Type Date
Programming This thread Refback 07-20-2007 08:42 AM
Programming This thread Refback 07-20-2007 05:39 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Issue vigneshgets Software Testing 2 01-24-2008 02:39 AM
Set focus issue nssukumar Flash Actionscript Programming 1 10-26-2007 07:32 AM
NFS Performance issue vivekanandan Server Management 0 09-20-2007 06:39 AM
Issue in Layout Anandavinayagam HTML, CSS and Javascript Coding Techniques 1 08-10-2007 10:47 PM
Issue Matrix shanmugamit Software Testing 0 05-24-2007 10:22 AM


All times are GMT -7. The time now is 09:17 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0