I have another problem in xml parsing. I have a XML string like:
<A>
<B>bbb</B>
<C>ccc</C>
<D>
      <D1>111</D1>
      <D2>222</D2>
      <D3>333</D3>
      <D4>444</D4>
      <D5>555</D5>
      <D6>666</D6>
</D>
</A>

I want to extract string
      <D1>111</D1>
      <D2>222</D2>
      <D3>333</D3>
      <D4>444</D4>
      <D5>555</D5>
      <D6>666</D6>
from the the xmlNodePtr <D>. I want the string as char *. I tried to use
function
xmlNodeGetContent(lv_xmlchild)
but it is giving me the content of all subtags content like
111222333444555666.
Please help me out.


On Wed, Sep 15, 2010 at 2:47 PM, Daniel Veillard <[email protected]>wrote:

> On Tue, Sep 14, 2010 at 04:23:13PM +0530, seemant bisht wrote:
> > Hi,
> > I want the way to convert xmlDocPtr to xml string. Actually I have to set
> > some data inside a tag for e.g.
> > I have to insert 444 inside tag A in xml string. <AA><A></A></AA>
> > So I have created xml DocPtr from the xml string and then I have set the
> > value 444 to that node. Now I have to extract the modified xml string.
> >
> > Waiting for response.
>
>   Why do you ask instead of looking the existing provided examples in the
> documentation ?
>
>  http://xmlsoft.org/examples/index.html#xpath2.c
>
> Daniel
>
> --
> Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> [email protected]  | Rpmfind RPM search engine http://rpmfind.net/
> http://veillard.com/ | virtualization library  http://libvirt.org/
>
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to