| Author |
how to check to see if xmlplaceholder has no data entry
|
|
| andrew007 2005-08-24, 6:06 pm |
| 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.
| |
| Stefan [MSFT] 2005-08-25, 2: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.
>
>
>
>
| |
| andrew007 2005-08-25, 6: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: http://tinyurl.com/6zj44
> ----------------------
>
>
> "andrew007" <gahdhi@yahoo.com> wrote in message
> news:6C8FF9F2-1345-494D-9B07-A7B94528595B@microsoft.com...
>
>
>
| |
| Stefan [MSFT] 2005-08-26, 7:53 am |
| 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:
>
|
|
|
|