CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    17

    Question using DOM in C++

    how can I convert a CString or char[] with the following message "<Server>name_of_server<Server>"
    to a DOM_Document .(I have to parse the info to know which server is talking to my program ).I was trying to use xerces c++ parser which uses DOM_Document. Anyone out there with suggestions??

    Thanks


  2. #2
    Join Date
    Jan 2002
    Location
    France
    Posts
    91

  3. #3
    Join Date
    Aug 2001
    Location
    Russia, Moscow
    Posts
    26
    I have used xerces from java, but I think the principle is the same.

    You should find DocumentBuilderFactory
    abstract sample:
    from javax.xml.parsers import DocumentBuilderFactory
    dFactory = DocumentBuilderFactory.newInstance()
    dFactory.setNamespaceAware(1)
    dBuilder = dFactory.newDocumentBuilder()
    stream = ByteArrayInputStream( YOUR_STRING )
    xmlDOM = dBuilder.parse(stream)


    I do not know the details of C++ realization, but the key object is DocumentBuilder
    Denis.

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