You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/03/21 06:03:50 UTC
DO NOT REPLY [Bug 18215] New: -
to get value of node
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18215>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18215
to get value of node
Summary: to get value of node
Product: Xerces-C++
Version: 1.4
Platform: Other
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: Parul.baliyan@ind.xerox.com
Please help me out
I want the value of node OS
My XML file is................
<XPTIl xmlns="x-schema:XPTI.biz">
- <Language name="English">
<LastEditMode>AdmMode</LastEditMode>
<InstallationMode>Non Silent</InstallationMode>
<InstallDocumentation>1</InstallDocumentation>
<CDFLAG>False</CDFLAG>
- <PrinterToInstall>
<PrinterName Sysid="someID">SomeName</PrinterName>
<OS>WIN2K</OS>
<Driver Type="DrvType">drv name</Driver>
<InfFile>inf file name</InfFile>
<InfPath Type="Remote">XYZ path</InfPath>
</PrinterToInstall>
</Language>
</XPTI>
and code is....................
parser->parse(XmlFile);
DOMDocument* doc = parser->getDocument();
DOMElement *element = doc->getDocumentElement();
XMLCh tempStr[100];
XMLString::transcode("OS", tempStr, 99);
DOMNodeList * nodeList = element->getElementsByTagName(tempStr);
XMLSize_t size = nodeList->getLength();
for(XMLSize_t index =0 ;index < size; index++)
{
DOMNode * OS = nodeList->item(index);
const XMLCh * OSValue = OS->getNodeValue();
char * szOSValue = XMLString::transcode(OSValue);
if(szOSValue == "WIN2K")
{
cout<< "2K";
}
}
Thanx
//Parul
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org