Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Problem with createElement/createNode of IXMLDOMDocumentPtr

Problem with createElement/createNode of IXMLDOMDocumentPtr

Scheduled Pinned Locked Moved XML / XSL
helpc++data-structuresxmlquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Binayak
    wrote on last edited by
    #1

    Hi, I'm using MSXML to produce a XML Doc from a Tree Control in my VC++ program. I am getting an weird error while trying to create XMLNodes. IXMLDOMNodePtr DOMNodePtr[100]; DOMNodePtr[i]=ptrDocIP->createElement(strRoot.AllocSysString()); //ptrDocIP is of type IXMLDOMDocumentPtr and sysRoot is CString I'm using the above statement in a fuction and I call that fuction repeatedly to add new nodes. When I add the first nodes, I don't get any exception, but, second time I get an Exception and the program terminated. I tried with createNode function and got the same error. Can anybody help? Binayak Bhattacharyya

    P A 2 Replies Last reply
    0
    • B Binayak

      Hi, I'm using MSXML to produce a XML Doc from a Tree Control in my VC++ program. I am getting an weird error while trying to create XMLNodes. IXMLDOMNodePtr DOMNodePtr[100]; DOMNodePtr[i]=ptrDocIP->createElement(strRoot.AllocSysString()); //ptrDocIP is of type IXMLDOMDocumentPtr and sysRoot is CString I'm using the above statement in a fuction and I call that fuction repeatedly to add new nodes. When I add the first nodes, I don't get any exception, but, second time I get an Exception and the program terminated. I tried with createNode function and got the same error. Can anybody help? Binayak Bhattacharyya

      P Offline
      P Offline
      Philip Fitzsimons
      wrote on last edited by
      #2

      whats the exception?


      "When the only tool you have is a hammer, a sore thumb you will have."

      1 Reply Last reply
      0
      • B Binayak

        Hi, I'm using MSXML to produce a XML Doc from a Tree Control in my VC++ program. I am getting an weird error while trying to create XMLNodes. IXMLDOMNodePtr DOMNodePtr[100]; DOMNodePtr[i]=ptrDocIP->createElement(strRoot.AllocSysString()); //ptrDocIP is of type IXMLDOMDocumentPtr and sysRoot is CString I'm using the above statement in a fuction and I call that fuction repeatedly to add new nodes. When I add the first nodes, I don't get any exception, but, second time I get an Exception and the program terminated. I tried with createNode function and got the same error. Can anybody help? Binayak Bhattacharyya

        A Offline
        A Offline
        adaoja
        wrote on last edited by
        #3

        Hi This probably doesn´t help but when I used lstElement->Item(0)->NamespaceURI in creating an xmlElemnt XmlElement *NameElement = doc->CreateElement("Name",lstElement->Item(0)->NamespaceURI); given that doc is an XMLDocument and lstElement is of type XmlNodelist. I got it to work. But again, I assume that there are two different problems. I added elements to an existing XMLDocument. Regards Daniel

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups