Dear List,
Suppose I have parsed in an InputSource with the following code:
InputSource *is;
DOMParser parser; parser.setValidationScheme(DOMParser::Val_Never); parser.parse(*is);
How can I retrieve from the parser the annotations from parsed XML input?
I'm interested in the lines like:
<?udm name="value" name1="value1"?> lines, before the root element.
Is this a special node?
That's a processing instruction named "udm"; to retrieve it, do
XMLCh udm[]={ chLatin_u, chLatin_d, chLatin_m, chNull };
DOMDocument* pDoc=parser.getDocument();
DOMNode* pNode=pDoc->getFirstChild();
while(pNode)
{
if(pNode->getNodeType()==DOMNode::PROCESSING_INSTRUCTION_NODE &&
XMLString::equals(pNode->getNodeName(),udm))
{
// do what you want
break;
}
pNode=pNode->getNextSibling();
}Alberto
Thanks, Endre
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
