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=5893>. 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=5893 non-terminated string Summary: non-terminated string Product: Xerces-C++ Version: 1.6.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] <<<The XML document (or excerpt) that failed>>> <?xml version="1.0"?> <text transform="translate(361,426)" style="fill:#000000; font-family:Times New Roman; font-size:96">ABC</text> <<<What happened>>> DOM_Node::getNodeValue() returns non-terminated string if the text node is specified with character reference. The rest of the returned buffer is filled with 0xCDCD. **result lpwValue[0]=0x0041 lpwValue[1]=0x0042 lpwValue[2]=0x0043 lpwValue[3]=0xcdcd lpwValue[4]=0xcdcd : : lpwValue[x]=0x0000 If text node is specified with normal text, DOM_Node::getNodeValue() returns terminated string. For anohter XML, DOM_Node::getNodeValue() of the described code returns "ABC" and the string is terminated with "0x0000" <?xml version="1.0"?> <text transform="translate(361,426)" style="fill:#000000; font-family:Times New Roman; font-size:96">ABC</text> <<<The C++ application code that failed>>> Main() { DOM_Document doc = Parser->getDocument(); DOM_Element schema = doc.getDocumentElement(); Read( schema ); } BOOL Read(DOM_Node Node) { CString strNodeName; CString strNodeValue; CONST WCHAR* lpwValue; strNodeName = Node.getNodeName().rawBuffer(); shNodeType = Node.getNodeType(); lpwValue = Node.getNodeValue().rawBuffer(); // this!!! get value DOM_NodeList ChildList; UINT nChildCount; ChildList = Node.getChildNodes(); nChildCount = ChildList.getLength(); for( UINT i=0; i<nChildCount; i++ ){ Read( ChildList.item(i) ); } return TRUE; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
