Is xmlDoc.OuteXml.Length!=0 and xmlDoc.DocumentElement!=null same??

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi
Is it valid to replace if( xmlDoc.OuterXml.Length!=0) with if( xmlDoc.DocumentElement!=null)?
When xmlDoc is loaded with Heavy document(~50MB), xmlDoc.OuterXml.Length throws OutofMemory Exception, so im looking for and alternative solution for this, So can i replace if( xmlDoc.OuterXml.Length!=0) with if( xmlDoc.DocumentElement!=null) ....?or
is there any better way to do this?
Thanks in advance,
Madhu Mahesh.
<br/>
<br/>

View the full article
 
Back
Top