-
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
:)
-
-
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