Hi Endre,

You don't need to downcast.  DOMNode::getNodeName() will return the target,
and DOMNode::getNodeValue() will return the data.  If you want to downcast,
you can just use a static cast, after you've called DOMNode::getNodeType()
and verified it's a processing instruction.

Dave



                                                                                       
                                                              
                      Endre Magyari                                                    
                                                              
                      <[EMAIL PROTECTED]         To:      [EMAIL PROTECTED]            
                                                      
                      >                        cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                                         
                                               Subject: Re: Annotations                
                                                              
                      02/20/2004 05:59                                                 
                                                              
                      AM                                                               
                                                              
                      Please respond                                                   
                                                              
                      to xerces-c-dev                                                  
                                                              
                                                                                       
                                                              




Thanks all,



             so getTarget() gives "udm" and getData() gives '
name1="value1"
name2="value2"'

             The name of such a  node is also "udm" ? And it's value is the
data,
unparsed?

             If not, and if I need the class DOMProcessingInstruction to
access the
information, how do I downcast a DomNode to DOMProcessingInstrcution?

             Can I use RTTI or static_cast ?

Thanks,
Endre.

On Fri, 20 Feb 2004 08:07:15 -0500, Jesse Pelton <[EMAIL PROTECTED]> wrote:

> A processing instruction doesn't have any structure (such as attributes
> and
> other children); its contents are basically just text to be interpreted
> by
> the XML processor (hence the name). You can get the target (in this case,
> the string "udm") with getTarget(), and the remainder of the text in the
> PI
> with getData(). See the DOMProcessingInstruction class member
> documentation.
>
>> -----Original Message-----
>> From: Endre Magyari [mailto:[EMAIL PROTECTED]
>> Sent: Friday, February 20, 2004 8:01 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: Annotations
>>
>>
>> >
>> > That's a processing instruction named "udm"; to retrieve it, do
>> [...]
>>
>> Thanks !
>> so it is  a node, not an element then.
>> I know how to access the attributes of an Element.
>> How can I access the attributes of a such a Node ?
>>
>> Thanks,
>> Endre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to