[studxml-users] namespace, prefix & xsi attr

Maxim Maslennikov maxim.maslennikov at gmail.com
Sat Feb 21 16:54:30 EST 2015


Hello!

Could you explain how to parse and serialize following root element:
<t:root xmlns:t='test' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='test test.xsd'>

I’m able to parse:

p.next_expect(parser::start_element, "test", "root", content::complex);
string namespace_ = p.namespace_();
string name = p.name();
string prefix = p.prefix();

And serialize:
s.start_element( namespace_, name );
s.namespace_decl( namespace, prefix );

but I get only:
<t:root xmlns:t="test">

Is it possible to get and serialize “xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='test test.xsd”?

Best Regards,
Maxim Maslennikov
Moscow Russia
+7 985 274-05-70



More information about the studxml-users mailing list