[xsde-users] Get the element name
Khuong Nguyen Thi Lien
ntlkhuong at tma.com.vn
Wed Sep 10 05:33:08 EDT 2008
Hi Boris,
Sorry for the unclear question, I have the xml fragment below, when the
parsing engine reaches the <greeting> element in the greeting() callback
function, I would like to extract the name of the element right at this
function. In this case I would like the returned name should be "greeting".
Thanks,
Khuong
struct hello_pimpl: hello_pskel
{
virtual void
greeting (const string& greeting)
{
greeting_ = greeting;
}
virtual void
name (const string& name)
{
cout << greeting_ << ", " << name << "!" << endl;
}
private:
string greeting_;
};
<hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="hello.xsd">
<greeting>Hello</greeting>
<name>sun</name>
<name>moon</name>
<name>world</name>
</hello>
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Wednesday, September 10, 2008 4:09 PM
To: Khuong Nguyen Thi Lien
Cc: xsde-users at codesynthesis.com
Subject: Re: [xsde-users] Get the element name
Hi Khuong,
Khuong Nguyen Thi Lien <ntlkhuong at tma.com.vn> writes:
> Could you show me how I can get the element-name in the schema file?
I am not sure what you mean by this. Can you explain what you are
trying to achieve in a bit more detail? Maybe also show a schema
and/or XML fragment.
Boris
More information about the xsde-users
mailing list