Remember whitespace. From AccessControlGroups you will have to go
getNextSibling()->getNextSibling()->getNextSibling()
Gareth
> ConstraintTypes->getFirstChild()->getNextSibling();
> <Type> is definitely not the first child, but there
> is nothing like getNextChild()...
>
> part of my code:
> ----------------
> // XML doc root element
> DOMDocument *DomDoc = parser->getDocument();
> DOMElement *rootElem = DomDoc->getDocumentElement();
>
> // <ConstraintTypes> (1)
> DOMNode *ConstraintTypes = DomDoc->getDocumentElement();
> nodeName = ConstraintTypes->getNodeName();
> chNodeName = XMLString::transcode (nodeName);
> std::cout << chNodeName << std::endl;
> delete [] chNodeName;
>
> // <AccessControlGroups> (0 or 1)
> DOMNode *AccessControlGroups =
> ConstraintTypes->getFirstChild()->getNextSibling();
> nodeName = AccessControlGroups->getNodeName();
> chNodeName = XMLString::transcode (nodeName);
> std::cout << " " << chNodeName << std::endl;
> delete [] chNodeName;
>
> // <AccessControlGroup> (0..*)
> for (AccessControlGroup = AccessControlGroups->getFirstChild();
> AccessControlGroup != 0;
> AccessControlGroup = AccessControlGroup->getNextSibling())
> {
> nodeName = AccessControlGroup->getNodeName();
> chNodeName = XMLString::transcode (nodeName);
> std::cout << " " << chNodeName << std::endl;
> delete [] chNodeName;
> }
>
>
> My XML file:
> ------------
>
> <ConstraintTypes>
> <AccessControlGroups>
> </AccessControlGroups>
>
> <Type>
> </Type>
> </ConstraintTypes>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]