how to check to see if xmlplaceholder has no data entry
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > how to check to see if xmlplaceholder has no data entry




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    how to check to see if xmlplaceholder has no data entry  
andrew007


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-24-05 11:06 PM

Hi I try to check to see if xmlplaceholder has data in it or not when loadin
g
control but It seems to have root element w/empty data so I can't tell w/the
following method.

Please let me know if you know how to test to see if there is data in a
xmlplaceholder or not. This is how I use it...

if (((XmlPlaceholder)ph).XmlAsString.Trim() == string.Empty)
noData = true;
else
noData = false;

note: when xmlastring returns "<plink></plink>" it is not string.Emtpy so my
result gonna be noData become false even though xmlplaceholder has no data
except for root element.









[ Post a follow-up to this message ]



    Re: how to check to see if xmlplaceholder has no data entry  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-25-05 07:52 AM

Hi Andrew,

why don't you check for empty and only root element?

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"andrew007" <gahdhi@yahoo.com> wrote in message
news:6C8FF9F2-1345-494D-9B07-A7B94528595B@microsoft.com...
> Hi I try to check to see if xmlplaceholder has data in it or not when
> loading
> control but It seems to have root element w/empty data so I can't tell
> w/the
> following method.
>
> Please let me know if you know how to test to see if there is data in a
> xmlplaceholder or not. This is how I use it...
>
> if (((XmlPlaceholder)ph).XmlAsString.Trim() == string.Empty)
> noData = true;
> else
> noData = false;
>
> note: when xmlastring returns "<plink></plink>" it is not string.Emtpy so
> my
> result gonna be noData become false even though xmlplaceholder has no data
> except for root element.
>
>
>
>







[ Post a follow-up to this message ]



    Re: how to check to see if xmlplaceholder has no data entry  
andrew007


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-25-05 11:02 PM

The root element keeps changing for every time so ..can you show me the
sample code to achieve your suggestion?

"Stefan [MSFT]" wrote:

> Hi Andrew,
>
> why don't you check for empty and only root element?
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: [url]http://tinyurl.com/6zj44[/url
]
> ----------------------
>
>
> "andrew007" <gahdhi@yahoo.com> wrote in message
> news:6C8FF9F2-1345-494D-9B07-A7B94528595B@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: how to check to see if xmlplaceholder has no data entry  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-26-05 12:53 PM

Hi Andrew,

if it is sufficient to strip out all XML tags then you can use this code:
http://blogs.technet.com/stefan_gos.../12/407637.aspx

This will require that your regular XML content contains texts between the
markup.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"andrew007" <gahdhi@yahoo.com> wrote in message
news:ACDB3283-0572-4681-B7E4-2F9C09AEC7C5@microsoft.com...[vbcol=seagreen]
> The root element keeps changing for every time so ..can you show me the
> sample code to achieve your suggestion?
>
> "Stefan [MSFT]" wrote:
> 







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:31 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register