2004-04-19 14:57:02 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* $RCSfile: libxmlutil.hxx,v $
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2007-06-13 06:58:58 +00:00
|
|
|
* $Revision: 1.4 $
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2007-06-13 06:58:58 +00:00
|
|
|
* last change: $Author: obo $ $Date: 2007-06-13 07:58:58 $
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
2005-09-07 18:36:19 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2004-04-19 14:57:02 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#if !defined INCLUDED_JVMFWK_LIBXMLUTIL_HXX
|
|
|
|
#define INCLUDED_JVMFWK_LIBXMLUTIL_HXX
|
|
|
|
|
|
|
|
|
|
|
|
#include "libxml/parser.h"
|
|
|
|
#include "libxml/xpath.h"
|
|
|
|
//#include "libxml/xpathinternals.h"
|
|
|
|
#include "rtl/ustring.hxx"
|
|
|
|
namespace jfw
|
|
|
|
{
|
|
|
|
class CXPathObjectPtr
|
|
|
|
{
|
|
|
|
xmlXPathObject* _object;
|
|
|
|
CXPathObjectPtr & operator = (const CXPathObjectPtr&);
|
|
|
|
CXPathObjectPtr(const CXPathObjectPtr&);
|
|
|
|
public:
|
|
|
|
CXPathObjectPtr();
|
|
|
|
/** Takes ownership of xmlXPathObject
|
|
|
|
*/
|
|
|
|
CXPathObjectPtr(xmlXPathObject* aObject);
|
|
|
|
~CXPathObjectPtr();
|
|
|
|
/** Takes ownership of xmlXPathObject
|
|
|
|
*/
|
|
|
|
CXPathObjectPtr & operator = (xmlXPathObject* pObj);
|
|
|
|
xmlXPathObject* operator -> ();
|
|
|
|
operator xmlXPathObject* ();
|
|
|
|
};
|
|
|
|
|
|
|
|
//===========================================================
|
|
|
|
class CXPathContextPtr
|
|
|
|
{
|
|
|
|
xmlXPathContext* _object;
|
|
|
|
|
2004-04-27 14:22:15 +00:00
|
|
|
CXPathContextPtr(const jfw::CXPathContextPtr&);
|
2004-04-19 14:57:02 +00:00
|
|
|
CXPathContextPtr & operator = (const CXPathContextPtr&);
|
|
|
|
public:
|
|
|
|
CXPathContextPtr();
|
2004-04-27 14:22:15 +00:00
|
|
|
CXPathContextPtr(xmlXPathContextPtr aContext);
|
|
|
|
CXPathContextPtr & operator = (xmlXPathContextPtr pObj);
|
2004-04-19 14:57:02 +00:00
|
|
|
~CXPathContextPtr();
|
|
|
|
xmlXPathContext* operator -> ();
|
|
|
|
operator xmlXPathContext* ();
|
|
|
|
};
|
|
|
|
|
|
|
|
//===========================================================
|
|
|
|
class CXmlDocPtr
|
|
|
|
{
|
|
|
|
xmlDoc* _object;
|
|
|
|
|
|
|
|
CXmlDocPtr(const CXmlDocPtr&);
|
2007-06-13 06:58:58 +00:00
|
|
|
|
2004-04-19 14:57:02 +00:00
|
|
|
public:
|
2007-06-13 06:58:58 +00:00
|
|
|
CXmlDocPtr & operator = (const CXmlDocPtr&);
|
2004-04-19 14:57:02 +00:00
|
|
|
CXmlDocPtr();
|
|
|
|
CXmlDocPtr(xmlDoc* aDoc);
|
|
|
|
/** Takes ownership of xmlDoc
|
|
|
|
*/
|
|
|
|
CXmlDocPtr & operator = (xmlDoc* pObj);
|
|
|
|
~CXmlDocPtr();
|
|
|
|
xmlDoc* operator -> ();
|
|
|
|
operator xmlDoc* ();
|
|
|
|
};
|
|
|
|
|
|
|
|
//===========================================================
|
|
|
|
// class CXmlNsPtr
|
|
|
|
// {
|
|
|
|
// xmlNs* _object;
|
|
|
|
|
|
|
|
// CXmlNsPtr(const CXmlNsPtr&);
|
|
|
|
// CXmlNsPtr & operator = (const CXmlNsPtr&);
|
|
|
|
// public:
|
|
|
|
// CXmlNsPtr();
|
|
|
|
// CXmlNsPtr(xmlNs* aDoc);
|
|
|
|
// /** Takes ownership of xmlDoc
|
|
|
|
// */
|
|
|
|
// CXmlNsPtr & operator = (xmlNs* pObj);
|
|
|
|
// ~CXmlNsPtr();
|
|
|
|
// xmlNs* operator -> ();
|
|
|
|
// operator xmlNs* ();
|
|
|
|
// };
|
|
|
|
|
|
|
|
//===========================================================
|
|
|
|
class CXmlCharPtr
|
|
|
|
{
|
|
|
|
xmlChar* _object;
|
|
|
|
|
|
|
|
CXmlCharPtr(const CXmlCharPtr&);
|
|
|
|
CXmlCharPtr & operator = (const CXmlCharPtr&);
|
|
|
|
public:
|
|
|
|
CXmlCharPtr();
|
|
|
|
CXmlCharPtr(xmlChar* aDoc);
|
2007-06-13 06:58:58 +00:00
|
|
|
CXmlCharPtr(const ::rtl::OUString &);
|
2004-04-19 14:57:02 +00:00
|
|
|
~CXmlCharPtr();
|
|
|
|
CXmlCharPtr & operator = (xmlChar* pObj);
|
2004-04-27 14:22:15 +00:00
|
|
|
// xmlChar* operator -> ();
|
2004-04-19 14:57:02 +00:00
|
|
|
operator xmlChar* ();
|
2007-06-13 06:58:58 +00:00
|
|
|
operator ::rtl::OUString ();
|
|
|
|
operator ::rtl::OString ();
|
2004-04-19 14:57:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|