[xml] help please



Now that I have subscribed and shut off HTML mail,  please consider
my request.

Hello,

I am trying to use your xml library (which I have found quite useful
mind you) to access an xml file and from that xml file, find
out what dtd it is using and validate it against that dtd (rather
than having to hard code into my program what the dtd is).

So, for example my xml file looks like

<?xml version="1.0"?>
<!DOCTYPE tokens_test SYSTEM "tokens.dtd">

<tokens_test>
<token1>
<prop1 p="hello there4">prop1</prop1>
<prop2>prop2</prop2>
</token1>
</tokens_test>

and as you can see from the file, I want to validate against
tokens.dtd.

Now, in my code I use

xmlDocPtr xml;
xmlNodePtr node;
xml = xmlParseFile(XMLFile)
node = xml->children;

and I notice that node->type is XML_DTD_NODE.

how can I get from this node position the value of tokens.dtd. I
thought that it would be through node->properties but that
value is set to NULL.

Thank you very much for your time and help.

Mike
--
Michael Picheca, pichecma mcmaster ca on 12/08/2001






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]