moorthy

Invalid XML data

Recommended Posts

Hi,

I am getting invalid xml data. It seems to be some issue in the argument I am passing in the link javascript method. Please find the xml tag below:

<set label='A-B' value='589987'  link='javascript:openInWindow("/GHJYT/ShowPage/ID_DATA?doFilterData=true&f[11][op]=EQ&f[11][len]=1&f[11][0]=4-7&f[7][op]=EQ&f[7][len]=1&f[7][0]=APT&DisplayType=chart", "","resizable=1" );'  tooltext = 'Count:589987'/>

Any idea? Thanks for the help in advance

Thanks,

Moorthy

Share this post


Link to post
Share on other sites

Hi,

I have another requirement. In the drill link I am calling one javascript method. The code is:

link='javascript:ShowMenu('Moorthy', 'Mark O'Hon)'

Have encoded single quote. After encoding the code is:

link='javascript:ShowMenu(%26apos;Moorthy%26apos;, %26apos;Mark O%26apos;Hon%26apos;)'

But I am getting javascript error while clicking the link(bar) in the chart. This issue is because the value itself having single quote. Have tried like this: 

link='javascript:ShowMenu(%26apos;Moorthy%26apos;, %26apos;Mark O'Hon%26apos;)'

i,e have replaced the sinle quote in the value by ' In this case I am getting invalid xml error.

Any solution. Thanks for the help in advance

Thanks,

Moorthy

Share this post


Link to post
Share on other sites

Found the solution!! The issue is because I didnt escaped properly. using java replace method have escaped with

Now it is working fine.

Thanks,

Moorthy

Share this post


Link to post
Share on other sites

Using %26apos; gets me past the Invalid XML problem. But when I click on the link, the resulting URL decodes the %26apos; back to '. So if I had a parameter like p=Mc'Donalds and I set link to p=Mc%26apos;Donalds, the URL becomes p=Mc'Donalds so my server sets p to Mc. Is there any way around that?

 

 

 

Thanks,

 

Brian

Share this post


Link to post
Share on other sites

Let me try that again with the correct escaping so you can see what I meant:

 

 

 

Using %26apos; gets me past the Invalid XML problem. But when I click on the link, the resulting URL decodes the %26apos; back to '. So if I had a parameter like p=Mc'Donalds and I set link to p=Mc%26apos;Donalds, the URL becomes p=Mc'Donalds so my server sets p to Mc. Is there any way around that?

 

 

 

Thanks,

 

Brian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now