CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    India,bangalore
    Posts
    295

    Create/Read MSXML2::IXMLDOMDocument poiner ?

    Hi All,

    I am using DOM to create,load,save to xML file.

    I am using CreateElement of MSXML2::IXMLDOMDocument pointer to create nodes.

    Lets say i have created 4 nodes, now i want to see what is the element at node 2 to verify.
    At this point of time i have not saved the document contents to file.

    can i do this ?

    if i try to go back and read the contents i am not able to get values at all.

    can any one please give a solution ?

    A sample application xmlParserFindTest.zip has been attached to see the behaviour.

    thanks ahead
    rajs
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2004
    Location
    England, Europe
    Posts
    2,492

    Re: Create/Read MSXML2::IXMLDOMDocument poiner ?

    Each IXMLDOMDocument has a documentElement property which gives you the top level element, you can then use the IXMLDOMElement 's childNodes properties to iterate through the child elements.
    Last edited by Zaccheus; January 16th, 2007 at 08:00 AM.
    My hobby projects:
    www.rclsoftware.org.uk

  3. #3
    Join Date
    Jun 2002
    Location
    India,bangalore
    Posts
    295

    Re: Create/Read MSXML2::IXMLDOMDocument poiner ?

    Hi Zaccheus,

    thanks for the reply,

    If you see in my sample application i am doing the same thing which you have suggested in function
    GetStartAndEndTime(char st[50],char et[50]).

    i am taking the root element using
    MSXML2::IXMLDOMElement* pRootElement = m_pGlXMLParser->GetRoot();

    But even then i am not able to parse after creating it.

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