Re: How do I determine if a element exists in an xml file?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi cj

As for the response XML document, does it have fixed schema or structure
or will the target elements you want to detect/verify always have some
fixed attributes(such as location in the document or have certain attribute
values ...). If so, I think using XPATH query to locate XML element in a
XML document is the reasonable approach. Here are some web articles
introducing using xpath query in .NET xml processing:

#INFO: Roadmap for Executing XPath Queries in .NET Applications
http://support.microsoft.com/kb/313828

#.NET and XML: XPath Queries
http://www.developer.com/xml/article.php/3383961

#.NET and XML: Part 1¡ªXPath Queries
http://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c
7589/

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


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








.



Relevant Pages

  • Re: Treat a DataSet as a class structure
    ... I'm now able to create and populate my XML and XSD files correctly. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: XML documentation file name
    ... MSDN document on VB.NET Project Designer says "The Generate XML document ... XML documentation is automatically emitted into an XML ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.languages.vb)
  • RE: XML Escaping for Textbox
    ... my understanding is that you use a TextBox on ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ... Subject: XML Escaping for Textbox ...
    (microsoft.public.dotnet.languages.vb)
  • RE: XmlNode.InnerXml and Xml Readers / XmlDocument
    ... The xml i copied was a part of a bigger xml document that does contain the ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)
  • Re: To get row in XML
    ... What is the alternative way of getting rows in XML with ATL? ... Unfortunately I have not got a response from the development team. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.data.oledb)