Re: [xml] help required in libxml parser



Dear Madam or Sir M.V.Satya Bhaskar,

I would like to remind you that libxml2 mailing list, referred to as the
forum henceforth, is a moderated public forum and that the internal policies
of your company do not hold any legal significance here.

Hence this forum is neither a legal entity, nor an individual, I would
kindly ask you to stop posting any information, including but not restricted
to text and code, which is marked as 'proprietary' and/or 'confidential'
and/or has any other form of restricted use, to this forum.

The disclaimer attached to your message marks all content as such and
clearly prohibits any use of all material contained therein. Your message
shall therefore, should the members of the forum agree, for your courtesy
not be used by any member of this forum and shall be deleted from the public
archives.

Further, you are advised that
 * you have no legal claim to extend the internal policy of your company to
this forum and the lack of any form of written agreement voids all
restrictions you attempt to enforce;
 * any information you post to this forum henceforth may be used, saved,
modified and reproduced in any manner;
 * sending further messages under guard of a restrictive disclaimer might
result in a denial of post right to you or your domain;

If you need further help regarding your inquiry about libxml software,
please post it without a restictive disclaimer, so that the information
contained therein can be processed.

Sincerely,
Igor Zlatkovic

To the mailing list members: You guys think this is apropriate?

More and more companies are enforcing disclaimers such as this one on all
outgoing mail and it is just the question of time until some moron really
posts confidential info and possibly causes damage to her company. In order
to avoid any possibility of legal dispute, I would suggest that a warning
similar to the above be put on the xmlsoft.org website. Me and others who
link to that mailing list should explicitly state that the rules must be
read and agreed to before posting anything. What do you think?



----- Original Message -----
From: "M.V.Satya Bhaskar" <bhaskar maddala wipro com>
To: <xml gnome org>
Sent: Friday, September 27, 2002 12:48 PM
Subject: [xml] help required in libxml parser


Hi,
   I'am currently trying to develop a small prototype where i tried using
libxml parser. and i'am now facing a couple of problems while parsing. I
think my understanding is not clear in those.

i'am basically trying to read a xml configuration file , parse it and then
use that data in my code.

my xml doc looks something like this (docname2)( i formatted it now):

  <?xml version="1.0" ?>
- <xmlbhas>
-    <protocolname>WAP1.2
-       <layer>WSP
-         <parameter>Version
            <required>M</required>
            <size>2</size>
          </parameter>
-         <parameter>CapabilitiesLen
            <required>M</required>
            <size>2</size>
          </parameter>
-         <parameter>Capabilities
            <required>C</required>
            <size>C</size>
-           <condition>
               <name>CapabilitiesLen</name>
               <condvalue>size</condvalue>
            </condition>
          </parameter>
        </layer>
     </protocolname>
  </xmlbhas>


in my code i use something like this (some imp lines of the sample code):

xmlDocPtr doc2 = NULL;
xmlNodePtr cur1 = NULL;
xmlNodePtr tempnode1 = NULL;
xmlNodePtr tempnode2 = NULL;
xmlChar * nodevalue1;
xmlChar * nodevalue2;

doc2 = xmlParseFile(docname2);
cur2 = xmlDocGetRootElement(doc2);

cur2 = cur2->xmlChildrenNode->xmlChildrenNode;

tempnode1 = cur2->xmlChildrenNode;
nodevalue1 = xmlNodeListGetString(doc2, tempnode1->xmlChildrenNode, 1);
tempnode2 = tempnode1->xmlChildrenNode;
nodevalue2 = xmlNodeListGetString(doc2, tempnode2->xmlChildrenNode, 1);
and when i print the value of nodevalue2, i thought that i would get the
value "M"   (the text in the "required" element) but i get a segmentation
fault. I think tempnode2 became a null ptr.
can anyone explain this is to me. I followed the example in the example dir
in the libxml.

Also being new to unix and especially makefiles, i just changed the existing
makefile in the example dir for my program and teh ourput i get is a shell
script. But i would prefer it to be an executable binary. what all do i need
to change for this? it would be really great if someone can show that from
teh makefile of example dir.

Thanks and BR
Bhaskar Maddala





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