Re: [xml] HTMLparser: UTF-8 byte order mark

2006-01-03 Thread Bjoern Hoehrmann
* Daniel Veillard wrote: > Hum, I don't know how it should be processed in theory ! In XML >the BOM is fine at the beginning of a document entity in UTF-8 or UTF-16 >but will usually mess things up in different encodings. For HTML I don't >know what the theory suggests. For compatibility I guess t

Re: [xml] DTD inclusion

2006-01-12 Thread Bjoern Hoehrmann
* Daine Mamacos wrote: >I was wondering, if you reference a DTD externally, if there was a way to >include that exterall DTD into the document? http://lists.w3.org/Archives/Public/www-archive/2005Feb/0029.html does that, in a way. libxml2 might also have APIs for this purpose though. -- Björn Höh

Re: [xml] encoding fails

2006-05-25 Thread Bjoern Hoehrmann
* Aron Stansvik wrote: >On 5/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> >> >> Aftonbladet öjesliv >> >> >> >> I try to extract the title element from the above. But the encoding is not >> recognised. What i get is this: >> Aftonbladet öjesliv > >What do you mean the

Re: [xml] Parsing a file that I didn't create

2006-10-14 Thread Bjoern Hoehrmann
* Jeffrey Bigham wrote: >libxml correctly messes this up because the closing HTML tags between >the tags aren't correctly written as <\/name>. Is there a >way to use libxml (I'm currently using the SAX parser) without having >it try to fix things for me? If not, is there another C library that >

Re: [xml] RelaxNG schema: possible to put reference into XML file?

2006-11-10 Thread Bjoern Hoehrmann
* David Hagood wrote: >It it true that there is no way to specify within an XML file that the >file has a specific RelaxNG schema associated with it? That is, that >unlike a DTD, it is NOT possible to have an XML file provide a reference >to a RelaxNG schema such that validating tools (e.g. libXML2

Re: [xml] libxml memory leaks

2007-01-18 Thread Bjoern Hoehrmann
* Yan Seiner wrote: >I am using libxml2-2.6.26, cross-compiled for an ARM platform. > >I am seeing very severe memory leaks - on the order of 40K per >invocation of xmlXPathNewContext (if I read valgrind correctly...) > >I've gone through the code, and I am using > >xmlFree(xpathCtx); > >paired wi

Re: [xml] Correct behaviour of RelaxNG interleave

2007-01-24 Thread Bjoern Hoehrmann
* Pavol Rusnak wrote: >I would like to ask, what is the correct behaviour of RelaxNG >interleave? Suppose we have the following example: The specification http://relaxng.org/spec-20011203.html#IDA2Z0R or http://books.xmlschemata.org/relaxng/relax-CHP-6-SECT-7.html should answer this. It seems you

Re: [xml] Correct behaviour of RelaxNG interleave

2007-01-24 Thread Bjoern Hoehrmann
* Bjoern Hoehrmann wrote: >Your test case somewhat simplified: > > a = element a { empty } > b = element b { empty } > c = element c { empty } > d = element d { empty } > > e = a & b > f = c & d > > start = element root { e & f } As Daniel

Re: [xml] Correct behaviour of RelaxNG interleave

2007-01-24 Thread Bjoern Hoehrmann
* Pavol Rusnak wrote: >They found out that Jing and xmllint behave differently in this test >case. Will you file the report or I should do it ? Please do. -- Björn Höhrmann · mailto:[EMAIL PROTECTED] · http://bjoern.hoehrmann.de Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworl

Re: [xml] Correct behaviour of RelaxNG interleave

2007-01-24 Thread Bjoern Hoehrmann
* Daniel Veillard wrote: >I don't see the reduction rule which would be equivalent to flattening out >to a single interleave. The interleaves are at that point in a binary form, >explain because I don't see how your draw that conclusion. We know that per (interleaves 1) the following is true: (

Re: [xml] How to skip "" in the output?

2007-03-08 Thread Bjoern Hoehrmann
* Jason wrote: >I am using xml to describing user parameters, and by the helping of a XSLT >file, the user parameters will be turned into a C code. So, I didn't want > appear in the file generated by xmlSaveFormatFile. I think you have the following options: * Use the attribute * Transform t

Re: [xml] Ask a question about xmlDocDumpFormatMemory() funciton.

2007-03-08 Thread Bjoern Hoehrmann
* Xu Chunrong wrote: >THE PROBLEM is when I call xmlDocDumpFormatMemory(pdoc, &tmp,&len,0) my >program works OK, >but if I call xmlDocDumpFormatMemory(pdoc, &tmp,&len,1), xml will find >unknown node, > pcur = pcur->xmlChildrenNode; I think you should use `children` instead, xmlChildrenNode is

Re: [xml] patch: Functions to parse and create URI query strings

2007-04-25 Thread Bjoern Hoehrmann
* Richard W.M. Jones wrote: >The semantics of query strings don't seem to be very well defined. http://ietfreport.isoc.org/idref/draft-hoehrmann-urlencoded/ will solve that eventually (there is a bug in the encoding algorithm which does not account for escaping '+', otherwise it should be fine).

Re: [xml] Clarification on XML Schema error

2007-05-17 Thread Bjoern Hoehrmann
* Boris Kolpackov wrote: >Rob Laveaux <[EMAIL PROTECTED]> writes: > >> > xmlns="" id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema";> > > >This is not necessary and is actually illegal since XML namespace >cannot be an empty string. I guess libxml gets confused by this >while th

Re: [xml] XML for config files

2007-05-18 Thread Bjoern Hoehrmann
* Jason Valenzuela wrote: >2. xmlReadMemory() - Read in the DTD from a char[]. This is certainly wrong, the procedure is for XML documents and DTDs are not XML documents. You have to use, for example, xmlParseDTD() to parse the DTD. >Are there applications where one should use the reader instead

Re: [xml] xpath query search only first attributes!?

2007-07-12 Thread Bjoern Hoehrmann
* adel wrote: ># test xml # > > > contents 1 > contents 2 > >## I assume you meant to write _str_ instead of _boo_ here. >for url in doc.xpathEval('//*[contains (@*, "str")]'): >1) http://bugs.php.net/bug.php?id=41974 As the http://www.w3.org/TR/xpath XPath specifica

Re: [xml] Is libmxl2 supported on VMWare ESX service console?

2007-07-18 Thread Bjoern Hoehrmann
* Agarwal, Saumya wrote: >Generating xmlIO.d ... >Generating obj/linux/xmlIO.p ... >xmlIO.c:32:18: zlib.h: No such file or directory You have to install the zlib development package (and perhaps other dependencies) prior to building libxml2, either through the package manager or by building it fro

Re: [xml] xmllint as minimal non-validating parser?

2007-09-17 Thread Bjoern Hoehrmann
* Daniel Veillard wrote: >A missing entity definition if the external subset >is not fetched is an error, not a fatal error, ... An error would be "A violation of the rules of this specification"; the example document given in this thread does not violate any rules of the XML 1.0 Recommendation, f

Re: [xml] static linking in VC++

2008-01-08 Thread Bjoern Hoehrmann
* ghosh wrote: >first i linked dynamically (libxml2.lib) and it was all working well. but >when i tried to link it statically (with libxml2_a.lib, iconv_a.lib, >zlib.lib and libxslt_a.lib (though i am not using xslt)) i got unresolved >external symbol error. do i need to include anymore lib files?

Re: [xml] xmlDocPtr save to file

2008-07-07 Thread Bjoern Hoehrmann
* AndrewHartley wrote: >I have a valid XML file loaded into an xmlDocPtr and would like to >successfully save to file. When I use the xmlSaveToFilename: > >[code] > xmlSaveToFilename(szFilepath, NULL, 0); >[/code] > >The file isn't succsfully written. I would appreciate any helpful advice. You

Re: [xml] Workaround to incorrect UTF8 encoding of HTML transformed to XHTML in xmllint?

2009-01-12 Thread Bjoern Hoehrmann
* Matt Poff wrote: >I have a migration pipeline that takes HTML files with UTF8 encoded >characters and pipes them through XMLlint to produce valid XHTML. This >is then queried by an XSLT files called by ETL scripts. However, no >matter what flags I use on xmllint, I cannot get it to output t

Re: [xml] Bug in encoding detection with document()

2009-03-23 Thread Bjoern Hoehrmann
* Chuck Bearden wrote: >It appears that libxslt1.1 pays attention to the charset declaration in the >Content-Type HTTP header when retrieving XML files with MIME types of >application/xml or text/xml via the document() function. If a misconfigured >web server sends "Content-Type: text/xml; char

Re: [xml] xmlXPathStringEvalNumber vs. atof

2009-06-22 Thread Bjoern Hoehrmann
* Christopher R. Palmer wrote: > In XPath 1.0 that is illegal syntax; it is legal syntax in XPath 2.0 which libxml2 does not support. Whether the specifications require the expression above to evaluate to true I am not sure. XPath 1.0 has specific requirements for parsing its numeric literals. --

Re: [xml] xmlXPathStringEvalNumber vs. atof

2009-06-22 Thread Bjoern Hoehrmann
* Christopher R. Palmer wrote: >/** > * xmlXPathStringEvalNumber: > * @str: A string to scan > * > * [30a] Float ::= Number ('e' Digits?)? >Is that [30a] from some addendum to XPath 1.0 or is it a libxml extension? It would have to be an extension, new features cannot be added to W3C recommen

Re: [xml] New user - UTF-16 issue

2010-06-02 Thread Bjoern Hoehrmann
* wrote: >1. I have an xml file called b.xml whose encoding attribute is UTF-16. >(attached along with this email) Your file is fine, and it is fine to read the raw bits into memory and pass that memory to libxml2 (without specifying an encoding). So the contents of the file is getting cor

Re: [xml] nanohttp

2010-06-02 Thread Bjoern Hoehrmann
* dhk wrote: >I'm trying to use nanohttp to get and parse file. Is there a way to >read the contents of a directory to see what's there before calling >xmlNanoHTTPFetch()? I thought xmlNanoHTTPMethodRedir() would do it, but >I can't get it to work. Is there an example? Also is there a way to >f

Re: [xml] What would make xmlSetProp return null?

2010-06-06 Thread Bjoern Hoehrmann
* Marco Rogers wrote: >I have two versions of my codebase with pretty minimal changes. Here's the >call to xmlSetProp > > xmlAttr *elem = xmlSetProp(element->xml_obj, > (const xmlChar*)*name, > (const x

Re: [xml] What would make xmlSetProp return null?

2010-06-06 Thread Bjoern Hoehrmann
* Marco Rogers wrote: >Thanks, that was it. Dealing with text nodes instead of elements. Any idea >on how to enable the debug functions? A quick look at the source suggests they are only available when the macro LIBXML_DEBUG_ENABLED has been defined during compilation. And that seems to be contr

Re: [xml] inconsistent behavior by "xmlChildElementCount()"

2010-08-28 Thread Bjoern Hoehrmann
* JerryWRice wrote: >My program places this XML document into a zero-terminated char text >buffer and creates a reader for it using "xmlReaderForDoc()". Then I >perform a series of "xmlTextReaderRead()" calls to advance my current >node to element "" on line 3. I've confirmed I'm at the openin

Re: [xml] Tools to look inside a DTD allows?

2011-02-06 Thread Bjoern Hoehrmann
* Jack Schwartz wrote: >However, it would be better if I used a tool to get this information if >one existed. (In my simple case, at least it would help with skipping >comments in the DTD file, etc.) Does such a tool or API exist in >libxml2, lxml or somewhere else? Well, you could use http:/

Re: [xml] How to free memory allocated with xmlNewDocFragment() ?

2011-02-08 Thread Bjoern Hoehrmann
* Alexandre Gouraud wrote: >I am working on gdome2 in cygwin. The test suite fail. I am stuck in the >debug somewhere with an invalid xmlFree() on a pointer allocated with >xmlNewDocFragment(). > >The libxml2 doc >(http://xmlsoft.org/html/libxml-tree.html#xmlNewDocFragment) does >not says what shou

Re: [xml] libxml causes crash on windows

2011-04-09 Thread Bjoern Hoehrmann
* Jellinghaus Andreas wrote: >on windows xp with vs 2008 I'm using libxml 2.7.7 (the binaries from >xmlsoft.org website). > >I have some third party app loading a plugin dll and running init(), do(), >done() functions, >and unloading the plugin dll. In my plugin dll I try to use libxml, and when

Re: [xml] Most portable xml library?

2011-04-09 Thread Bjoern Hoehrmann
* richardcav...@mail.com wrote: >I'm writing a Wikipedia bot in C. It is designed to be as standard and >portable as possible. I'm looking for an XML library to parse the >output of Wikipedia requests. The tasks are in fact very simple. For >example, look at the login result item here: > >ht

Re: [xml] More libxml questions

2011-04-09 Thread Bjoern Hoehrmann
* richardcav...@mail.com wrote: >1. Can I statically link libxml2 into my code on any platform? The answer to that is likely "no" simply because "any platform" is too vague. As I've encountered it, libxml is rarely statically linked for various reasons, but I am not aware about anything that make

Re: [xml] gzdirect could not be located in the dynamic link library zlib1.dll

2011-05-05 Thread Bjoern Hoehrmann
* preet $ wrote: > I am trying to run the example provided with libxml2-2.2.7-win32.zip, but >I get the message "The procedure entry point gzdirect could not be located >in the dynamic link library zlib1.dll" I don't know how to proceed with this >issue. Is this because of wrong version of zlib.

Re: [xml] can't figure out how to build native Windows 'iconv'

2011-09-18 Thread Bjoern Hoehrmann
* David Lawless wrote: >Searched for nearly an hour and dug in the release >tree and I can't find any clear information on how to >compile GNU 'libiconv' natively under Windows with >Visual Studio 2008 and/or 2010. README.woe32 in the current libiconv sources is pretty clear about this, "Building

Re: [xml] can't figure out how to build native Windows 'iconv'

2011-09-18 Thread Bjoern Hoehrmann
* David Lawless wrote: >Igor Zlatkovic appears to have it figured out for >his binaries found at > > http://www.zlatkovic.com/libxml.en.html > >bug I couldn't find instructions or build files there. His binaries are for version 1.9.2 which had support for MSVC, but it is eight years old, so I w

Re: [xml] GNOME BUGZILLA FORBIDDEEN ACCESS ---How to solve/fix this issue?

2011-09-27 Thread Bjoern Hoehrmann
* satya wrote: >http://bugzilla.gnome.org/buglist.cgi?product=libxml2 This redirects to 'https:' and then works for me. Are you sure this was not a temporary issue? What IP address does 'bugzilla.gnome.org' resolve to for you (use, say, `ping bugzilla.gnome.org` to tell)? What country are you tryi

Re: [xml] libxml2 linker errors in Visual Studio 2010

2011-10-12 Thread Bjoern Hoehrmann
* Alec Taylor wrote: >1>LINK : fatal error LNK1561: entry point must be defined : The linker did not find an entry point. You may have intended to link as a DLL, in which case you should link with the /DLL option. You may have

Re: [xml] libxml2 linker errors in Visual Studio 2010

2011-10-12 Thread Bjoern Hoehrmann
* Alec Taylor wrote: >Thanks Bjoern, but I still can't figure out how to link it properly. http://en.wikipedia.org/wiki/Main_function#C_and_C.2B.2B -- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de

Re: [xml] path with xmllint

2011-11-14 Thread Bjoern Hoehrmann
* John Davis wrote: >Not sure if this is the right place to ask, but I am using the >xmllint.exe for windows. I've noticed that queries which use >conditionals do not work. I am not sure if this is a limitation with >the dos shell or the syntax of xmllint. > >I've tried: >xmllint Foo.xml --xpath

Re: [xml] path with xmllint

2011-11-14 Thread Bjoern Hoehrmann
* John Davis wrote: >On Mon, Nov 14, 2011 at 9:57 AM, Alex Bligh wrote: >> how about >> >> xmllint Foo.xml --xpath "/XXX/(one|two)/YYY" > >Sadly, no. It says XPath error : Invalid expression with the caret >symbol beneath the first Parenthesis. That is because you have an invalid expression, at

Re: [xml] Link warnings .... that may be causing my COM component to not load

2011-11-25 Thread Bjoern Hoehrmann
* john.mur...@uk.bnpparibas.com wrote: >1>LINK : warning LNK4098: defaultlib 'mfc80ud.lib' conflicts with use of >other libs; use /NODEFAULTLIB:library >1>LINK : warning LNK4098: defaultlib 'mfcs80ud.lib' conflicts with use of >other libs; use /NODEFAULTLIB:library You are linking to MFC both dy

Re: [xml] Link warnings .... that may be causing my COM component to not load

2011-11-27 Thread Bjoern Hoehrmann
* Michael Ludwig wrote: >Bjoern Hoehrmann schrieb am 25.11.2011 um 11:42 (+0100): >> * john.mur...@uk.bnpparibas.com wrote: >> >1>LINK : warning LNK4098: defaultlib 'mfc80ud.lib' conflicts with >> >use of other libs; use /NODEFAULTLIB:library >> >1

Re: [xml] The issue around LoadLibrary on Windows

2012-05-23 Thread Bjoern Hoehrmann
* Daniel Veillard wrote: > C.f. the bug Fix windows unicode build > https://bugzilla.gnome.org/show_bug.cgi?id=638650 > >and the previous discussions here: > > http://mail.gnome.org/archives/xml/2008-February/msg00094.html > >now that the release is done, can we have a final decision on this. >A

Re: [xml] document node

2012-09-20 Thread Bjoern Hoehrmann
* Vojtech Fried wrote: >I would expect XPath '/data/message/ancestor-or-self::*' to return three >nodes: document node (the node with type XML_DOCUMENT_NODE), 'data' node >(the root node) and 'message' node. I don't get the document node >though. The node test `*` matches only element nodes; us

Re: [xml] Regarding Adding namespace prefix to the Root Element

2013-02-05 Thread Bjoern Hoehrmann
* Venkataragavan Vijayakumar wrote: >I want to generate a XML like the following , In this example root element >Envelope having namespace prefix as "S11" . How to add the namespace prefix >to the Root Element. In my code below I have simply given Root element name >as "S11:Envelope", I know it is

Re: [xml] possible bug with '' ?

2013-03-12 Thread Bjoern Hoehrmann
* dave c wrote: >I'm creating an app that will be used to author a UIRibbon binary. The >ribbon source is written in standard XML and validated against a >microsoft schema. The schema works well with msxml but I'd prefer to use >libxml if I can. However the schema fails to parse when using >xml

Re: [xml] How to find the End of the SOAP XML BODY

2013-03-15 Thread Bjoern Hoehrmann
* Venkataragavan Vijayakumar wrote: >I am receiving the multiple xml bodies using a single TCP connection , how >to identity the End of a XML body. There is no general solution to that problem. Usually there would be a protocol layered on top of TCP that segments the stream, like HTTP has individu

Re: [xml] libxml2 - Unicode compile under MSVC 2010

2013-03-29 Thread Bjoern Hoehrmann
* nscg wrote: >Since I would like to use libxml2 with a wxWidgets application in a Unicode >compile, I have been looking around for suitable libraries or DLLs. >My preference would be using MSVC 2010 Express as the compiler/debugger. > >I did find instructions for building the libraries using MSVC

Re: [xml] Posting a patch to this list

2013-11-19 Thread Bjoern Hoehrmann
* Patrick Monnerat wrote: >As a first-time mailer to this list, I tried yesterday to post a big >(~250k) gzipped patch to introduce support for the OS/400 platform. > >I did create an account and I see this e-mail has been accepted by the >list server, but it has never been sent back nor appea

Re: [xml] Parsing CSS

2013-12-02 Thread Bjoern Hoehrmann
* Bogdan Cristea wrote: >Is there a way to parse with libxml2 CSS files ? No. But look for 'Libcroco' using your favourite search engine. -- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dage

Re: [xml] Error when cross compiling libxml2 2.9.1 for windows on linux.

2014-01-20 Thread Bjoern Hoehrmann
* Desmond Daignault wrote: ># iconv and zlib are the build directory for each, ensure the directory name ># is updated below if updating the version of those libraries. >./configure --prefix=${PWD}/../install \ >--without-threads \ >runxmlconf.o:runxmlconf.c:(.text+0x50d): undefined refere

Re: [xml] xmlTextReader and character encoding

2014-01-30 Thread Bjoern Hoehrmann
* Shane Dempsey (shdempse) wrote: > I am using libxml2 and the xmlTextReader to parse the xml content below. > >Libxml somehow interprets the content contained in the xml node and uses >that information to encode the parsed content resulting in the insertion >of the  character. Is there a way to

Re: [xml] libxml2.9.0 Vulnerability Confirmation

2014-01-30 Thread Bjoern Hoehrmann
* Sandeep H S wrote: >We have a product which is dependent on libxml2. I required one >confirmation regarding "Multiple use-after-free vulnerabilities in libxml2 >2.9.0". It would be very helpful if you please confirm the same > >http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1969 > >In the

Re: [xml] Should a Windows zip file for LIBXML2 contain all the files needed to build a simple LIBXML2 example program?

2014-09-21 Thread Bjoern Hoehrmann
* Tony Girgenti wrote: >I'm trying to build a simple LIBXML2 example program from here: >http://xmlsoft.org/tutorial/apc.html using the supposedly Windows libxml2 >folders from here: ftp://ftp.zlatkovic.com/libxml/ > >Should the all files that I need to build that simple program in Windows be >cont

Re: [xml] node() xpath and entity ref nodes

2014-11-14 Thread Bjoern Hoehrmann
* Vojtech Fried wrote: >[...] Please do not use the "Reply to" function of your mail client to compose new and independent mails to the mailing list. >I have an xml like this > > >]> > > &greeting; > Today, our greeting is &greeting; > > >And xpath count(/root/value/node()) returns 1.

Re: [xml] Issue building libxml2 with mingw 64bit gcc

2015-02-26 Thread Bjoern Hoehrmann
* James Franco wrote: >admin@US01WKS03044 /c/libxml2-2.6.30 >$ make64 >make all-recursive >process_begin: CreateProcess(NULL, make all-recursive, ...) failed. >make (e=2): The system cannot find the file specified. >Makefile:560: recipe for target 'all' failed >make64: *** [all] Error 2 > >any sug