CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2001
    Posts
    193

    XmlDoc Writer Helper

    Hello

    Does anyone know of any Design Patterns or helper classes that have been written to simplify the task of programatically creating and updating XmlDocuments?

    It is easy enough to use XmlDocument and other related classes to do this, the problem is that you end up writing and rewriting many functions with very specific knowledge on how to iterate through the document to find the location to do your inserts etc. I am rather new to writing the documents though so there may well be a better way.

    Thanks for your time and ideas
    Patrick

  2. #2
    Join Date
    Feb 2001
    Location
    Sydney, Australia
    Posts
    1,909

    Re: XmlDoc Writer Helper

    A lot of the people end up with the their own helper classes with the following set of methods:

    Code:
    CreateAttribute(XmlEmenent, attributeName);
    CreateElement(elementName);
    GetElement(xpath);
    GetAttribute(xpath)
    GetElementValue(xpath);
    GetAttributeValue(xpath)
    With the functions above you can do most of the simple creating/updating.

    Non-trivial updating-tranformations usually implemented using XSLT.


    Quote Originally Posted by patrickcbrown
    Hello

    Does anyone know of any Design Patterns or helper classes that have been written to simplify the task of programatically creating and updating XmlDocuments?

    It is easy enough to use XmlDocument and other related classes to do this, the problem is that you end up writing and rewriting many functions with very specific knowledge on how to iterate through the document to find the location to do your inserts etc. I am rather new to writing the documents though so there may well be a better way.

    Thanks for your time and ideas
    Patrick
    Best regards,
    Igor Sukhov

    www.sukhov.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured