libxml2

Linux 搭建 discuz 论坛

前提是你 提交于 2019-12-01 07:46:03
Discuz! 是腾讯(Tencent)旗下 Comsenz 公司推出的以社区为基础的专业建站平台,帮助网站实现一站式服务。让论坛(BBS)、个人空间(SNS)、门户(Portal)、群组(Group)、应用开放平台(Open Platform)充分融合于一体,帮助网站实现一站式服务。 Discuz 是基于php网页,在 linux 和 windows 两平台均可部署的论坛工具,本文是基于LAMP搭建论坛的教程。 1, 准备工作 Discuz是基于php,首先需要搭建php运行环境, windows平台搭建php请见我的 百度文库 ,本文介绍linxu平台搭建方法。 1) 安装 apache,请见我先前的博客: Ubuntu 配置 Apache 2) 安装 php(依次先安装mysql + libxml2 + php) (a) php 官方 下载 , 本文是下载最新版 php-5.4.15.tar.gz (b) 安装mysql: sudo apt-get install mysql-server (c) 下载 libxml2 ,本文下载最新版 libxml2-2.9.1.tar.gz ,安装libxml2: tar zxvf libxml2-2.9.1.tar.gz cd libxml2-2.9.1/ sudo mkdir -p /opt/libxml2 sudo .

Iterating over nodes using XML::LibXML

前提是你 提交于 2019-12-01 05:54:42
问题 I am using XML::LibXML (Ver: 1.70). My xml input file looks like this: <?xml version="1.0" encoding="UTF-8"?> <Equipment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Equipments> <ECID logicalName="SysNameAlpha" id="0"/> <ECID logicalName="SysNameBeta" id="1"/> </Equipments> </Equipment> and my Perl script: my $file = 'data.xml'; my $parser = XML::LibXML->new(); my $tree = $parser->parse_file($file); my $root = $tree->getDocumentElement;

Why does XML::LibXML find no nodes for this xpath query when using a namespace

柔情痞子 提交于 2019-12-01 05:44:54
I'm attempting to select a node using an XPath query and I don't understand why XML::LibXML doesn't find the node when it has an xmlns atribute. Here's a script to demonstrate the issue: #!/usr/bin/perl use XML::LibXML; # 1.70 on libxml2 from libxml2-dev 2.6.16-7sarge1 (don't ask) use XML::XPath; # 1.13 use strict; use warnings; use v5.8.4; # don't ask my ($xpath, $libxml, $use_namespace) = @ARGV; my $xml = sprintf(<<'END_XML', ($use_namespace ? 'xmlns="http://www.w3.org/2000/xmlns/"' : q{})); <?xml version="1.0" encoding="iso-8859-1"?> <RootElement> <MyContainer %s> <MyField> <Name>ID</Name>

Automatic XSD validation

浪尽此生 提交于 2019-12-01 03:32:51
According to the lxml documentation "The DTD is retrieved automatically based on the DOCTYPE of the parsed document. All you have to do is use a parser that has DTD validation enabled." http://lxml.de/validation.html#validation-at-parse-time However, if you want to validate against an XML schema, you need to explicitly reference one. I am wondering why this is and would like to know if there is a library or function that can do this. Or even an explanation of how to make this happen myself. The problem is there seems to be many ways to reference an XSD and I need to support all of them.

【python】windows Python3.6下scrapy框架的安装

折月煮酒 提交于 2019-11-30 23:52:18
pip install scrapy 命令安装,提示 Failed building wheel for Twisted Microsoft Visual C++ 14.0 is required... 解决: 1、直接使用pip install scrapy安装不成功可以安装whl格式的包 首先下载scrapy的whl包 下载地址: http://www.lfd.uci.edu/~gohlke/pythonlibs/ 在网页中搜索scrapy找到 Scrapy‑1.3.3‑py2.py3‑none‑any.whl 下载了scrapy的whl包先不要着急安装,接着 2、安装whl格式包需要安装wheel库 看到别人的博客上说可以直接使用pip install wheel安装wheel,由于我已经安装过wheel了,在这里就不用安装了,就没有测试怎么安装wheel。 没有安装过wheel库的请先安装。 3、scrapy依赖twiste,同样使用whl格式的包进行安装 还是进入 http://www.lfd.uci.edu/~gohlke/pythonlibs/,在网页中搜索twisted找到其对应的whl包并下载 Twisted‑17.1.0‑cp36‑cp36m‑win_amd64.whl 根据你的Python的版本选择合适的包,名称中间的cp36是python3.6的意思

编译安装php7.0.7

自古美人都是妖i 提交于 2019-11-30 23:48:52
系统环境 centos x64 安装编译工具 yum -y install gcc gcc-c++ 1、准备安装包列表 http://cn.php.net/distributions/php-7.0.7.tar.gz ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz http://liquidtelecom.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz http://ftp.yzu.edu.tw/nongnu//freetype/freetype-2.5.0.tar.gz http://tenet.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz ftp://ftp.openssl.org/snapshot/openssl-1.0.1-stable-SNAP-20160618.tar.gz 2、编译安装 libxml2 ./configure --prefix=/opt/libxml2/ make make install 3、编译安装 libmcrypt ./configure --prefix=/opt/libmcrypt/ make make install

Need help installing lxml on os x 10.7

ぃ、小莉子 提交于 2019-11-30 15:20:11
I have been struggling to be able to do from lxml import etree ( import lxml works fine by the way) The error is: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/lxml/etree.so, 2): Symbol not found: _htmlParseChunk Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so Expected in: flat namespace in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so i used pip to install lxml, and homebrew to reinstall libxml2 with the right architecture (or so i

iPhone libxml2 not found during build

跟風遠走 提交于 2019-11-30 13:56:07
问题 I currently got some errors with libxml2 in my iPhone project. This was working before, after making some changes in my build properties building failed. (libxml2.dylib is added in the build phases) #import <libxml/tree.h> #import <libxml/parser.h> #import <libxml/xmlstring.h> #import <libxml/xpath.h> #import <libxml/xpathInternals.h> I've added the following items to the Build Settings: Other Linker Flags: -lxml2 Header Search Paths: /usr/include/libxml2 I've tried adding them to the project

Swift Framework with libxml

风格不统一 提交于 2019-11-30 13:51:49
I have Swift Framework project that uses the KissXML Objective-C library. KissXML internally uses libxml. When I build the xcode project (Xcode 6 - beta 5), I get this error: error: <unknown>:0: error: '/SwiftFramework/SwiftFramework/KissXML/DDXMLNode.h:2: include of non-modular header inside framework module SwiftFramework.DDXMLNode I have seen this answer that discusses making the relevant header files public. I have done that but I am not sure how to address the case of this header that is imported in the DDXMLNode.h and that is not explicitly part of my project: #import <libxml/tree.h> Any

iPhone libxml2 not found during build

无人久伴 提交于 2019-11-30 08:32:22
I currently got some errors with libxml2 in my iPhone project. This was working before, after making some changes in my build properties building failed. (libxml2.dylib is added in the build phases) #import <libxml/tree.h> #import <libxml/parser.h> #import <libxml/xmlstring.h> #import <libxml/xpath.h> #import <libxml/xpathInternals.h> I've added the following items to the Build Settings: Other Linker Flags: -lxml2 Header Search Paths: /usr/include/libxml2 I've tried adding them to the project and targets (at the same time, and switching between them) without any difference. I also tried adding