[xml] Using xmlNodeGetContent() to parse custom styles of attribute specification.



Hi,

I have a usage question and I tried looking this up and failed miserably. I am a novice at using XML parsers but I have been given a task to fix something in a component I deal with at work. So any kind of reply or suggestion would be greatly appreciated.

xmlNodeGetContent() which expects a node structure as shown below:

 

      <node> node_name </node>


I wish to parse an input of the format:


<spirit:addressBlock spirit:name="stereo_reg">


Is there a way to instruct the library to accept custom styles like the one mentioned above? I could get my parser to correctly decode the "name" attribute by changing the input to:


<spirit:addressBlock> <spirit:name>stereo_reg</spirit:name> .... </spirit:addressBlock>


But I would like to enhance my parser to accept both styles.


Thanks,

Varun



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]