Hi All,
I found this interesting post explaining how to use saxparser for large xml files in ruby
http://www.ioncannon.net/programming/643/fast-xml-parsing-with-ruby/
I would like to use the line : parser = XML::SaxParser.file("posts.xml") in one of my controllers, but instead of a file I have an xml post from another app, can anyone hel...
hi all I'm trying to extract the "META" description from a webpage using libxml for python. When it encounters UTF chars it seems to choke and display garbage chars. However when getting the data via a regex I get the unicode chars just fine. Am I doing something wrong with libxml?
thanks
''' test encoding issues with utf8 '''
from lx...
Hi,
I've been using libxml2 push parsing (SAX) to parse an incoming XML stream, this works well first time but crashes on the second attempt every time, my code looks like this:
xmlSAXHandler saxHandler;
memset(&saxHandler, 0, sizeof(m_SaxHandler));
xmlSAXVersion(&saxHandler, 2);
saxHandler.initialized = XML_SAX2_MAGIC; // so we do th...
Hi Guys,
If I do nil, I am not getting the leaks but I am getting the exceptions due to nil object.
I am getting its retain count as 4. How can I make its retain count to 0
- (void) dealloc
{
printf("\n Hai I am in Dealloc Method of Customer Lib Xml Parser......................");
self.connection = nil;
xmlFreeParserCtxt(_xmlParserCont...
I'm trying to write XML files with libxml2 in ISO-8859-1.
But from the documentation it seems that for each text node that I create I'll have to convert to UTF-8 which is libxml's internal encoding. Then when calling xmlSaveFormatFileEnc() libxml converts to the target encoding and adds the encoding attribute to the document.
Is this a...
I write the following (DOM) Perl script (shown below) in order to create the following XML DOM:
<books>
<computer/>
</books>
How can I save the XML output into test.xml file? I tried to save the XML with
$doc->printToFile('/tmp/test.xml');
but I get:
can't locate object method "printToFile" via package "XML::LibXML::Document"...
Hello, I am currently trying to read from an xml file which records the jobs on a PBS. I have succesfullly managed to parse the code, but am unable to insert the objtects into my database, i receive this error:
"You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred...
For an XML that has
<?xml version="1.0" encoding="utf-8"?>
<COLLADA version="1.4.0" xmlns="http://www.collada.org/2005/11/COLLADASchema">
<library_geometries>
<geometry id="Cube">
<mesh>
<source id="Cube">
<float_array count="24" ">1 2 3</float_array>
[..]
I'm getting properly "1 2 3" string with a
if (!xmlStrcmp(c...
Hi.
How can one add new line using libxml1.2.3. in xml file.
...
Hi
I'm trying to compile my project, containing cocos2d and standard UIKit part, i'm trying to do this for iphone 3g/3Gs.
The problem is, when i'm building it for debug configuration, it goes like on butter (no errors). But, when i switch to release, i've got over 1300 errors, all of them are like:
printscreen
almost all of them conta...
Hi All,
Currently, I am using the XML::LibXML perl module to validate an XML file against a defined XML schema. At the moment, if my XML file fails to validate successfully against the defined XML Schema, I will get a list of errors informing me, for example that certain elements were not expected and then what was expected instead. In ...
When I use libxml2 in my ipad project (i use the dylib and add the header flags correctly) it doesn't build and gives the error:
/Xcode4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/include/libxml2/libxml/xmlversion.h:24
Expected '=','','.','asm' or 'atrribute' before 'void'.
line 23-25 of xmlversion.h ...
Hello all...
I am trying to parse an XML document in C++. I do not have any form of metadata associated with the document. Since i am a novice with XML's i wanted to understand the best way to parse this xml. I am using libxml2 to achive this.
What i am doing currently is
1) walking the complete tree node by node , using pointers of ...
Hi,
I have a XML document which is received as a character stream. I wish to parse this using libxml2. Well one way would be to save it as an .xml and then open it using one of the libxml2 API's. Is there a way i can directly build a tree on this stream and parse it ?
Env is purely c++/c.
Cheers!
...
Hi guys,
I am fairly new to XML dev.. I had a few questions regarding XML parsing with XPATH and libxml.
I have an XML structured as :
<resultset>
<result count=1>
<row>
<name> He-Man! </name>
<home> Greyskull </home>
<row>
</result>
<result count=2>
...
I'm having a heck of a time figuring out how to use the sax parser for libxml2. Can someone post an example that parses this XML ( yes, without the <xml...> header and footer tags, if that can be parsed by the libxml2 sax parser):
<hello foo="bar">world</hello>
The parser should print out the data enclosed in element hello and also g...
After upgrading from PHP 5.2.8 to 5.3.3, the new libxml_disable_entity_loader(false) function does not seem to work on Windows via command line to a PHP file on a network share. More specifically, DOMDocument::schemaValidate() fails with XSD files that contain multiple levels of nested include()'s to other XSD files on a network share.
...
Hello,
(I'm using PHP 5.2.6 and phpinfo says it has libxml 2.6.32 loaded)
I'm also using wordpress and whenever xml_parse() function is called I get < and > stripped out from the result, instead of being converted to "<" and ">".
I found people talking this is a bug which hits newer versions of libxml but I have the old one and...
Hello everybody,
I have a problem with the libxml parser on the iPhone! Im using the PerformXMLXPathQuery to parse a xml file with about 100'000 lines. The app breaks while running the PerformXMLPathQuery because it runs out of memory. What can I do here?
Thanks,
Markus
...
Hello everybody,
Im using libxml2 on the iPhone with the nice Method: PerformXMLXPathQuery from Cocoa with Love. The problem is how to find out witch xml got sent without first parsing the whole document... I tried to use the @"/" query to retrieve the first element as written on the introduction of Cocoa with Love but unfortunately, th...