[xsd-users] keep_dom causes segmentation fault

Oliver.Kowalke at infineon.com Oliver.Kowalke at infineon.com
Wed Apr 5 10:13:49 EDT 2006


Hello,
if I apply the keep_dom flag to the parsing function I get an
segmentation fault (vc-7.1, file elements.hxx, line 442: DOMNode& n
(*c->_node ()->getChildNodes ()->item (i));) 
if I try to access the next node:

xercesc::XMLPlatformUtils::Initialize();
{
	std::auto_ptr< a_type > a_n( 
		a(
			path,
			xml_schema::flags::keep_dom |
xml_schema::flags::dont_initialize) );

	b_type b_n = a_n->b();
	c_type c_n = b_n.c();
	xercesc::DOMNode * p = c_n._node();
	if ( ! p)
		throw std::runtime_error("pointer to node is empty");
	// how to access content of '<para>' == should be
'<embedded-xml>abc</embedded-xml>'
}
xercesc::XMLPlatformUtils:: Terminate();


How can I access the value of <para> if it is of type xsd:any? I want to
get the
String "<embedded-xml>abc</embedded-xml>".

Regards,
Oliver

 <<hello.xsd>>  <<hello.xml>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello.xsd
Type: application/octet-stream
Size: 564 bytes
Desc: hello.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060405/818da5cb/hello.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello.xml
Type: text/xml
Size: 202 bytes
Desc: hello.xml
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060405/818da5cb/hello.bin


More information about the xsd-users mailing list