Skip to content

Commit

Permalink
Update documentation to "modern" markdown flavor.
Browse files Browse the repository at this point in the history
  • Loading branch information
rioki committed Aug 25, 2020
1 parent 356e5f6 commit be24994
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 74 deletions.
97 changes: 33 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,33 @@

========
libxmlmm
========
# libxmlmm

About
=====

## About

Libxmlmm is a C++ wrapper for libxml 2.0 that only relies on standard C++ and
libxml2.

Install
=======
## Install

Dependencies
------------
### Dependencies

To build libxmlmm libxml2 is needed. The latest version of libxml2 can be found
at http://xmlsoft.org/. There the dependency iconv can also be found.

For the unit tests UnitTest++ is required. The latest version can be found
at http://unittest-cpp.sourceforge.net/. (The active development moved to
http://code.google.com/p/unittestpp/, but there seems not to be much activity.)

Building with Make
------------------
### Building with Make

To install the library you use the traditional "GNU tipple jump":

./configure
make
make install

Building with CodeLite
----------------------

The windows version is actively developed with CodeLite. To build the package
you will have to set the environment variables ICONV_DIR, LIBXML2_DIR and
UNIT_TEST_DIR to the corresponding dependencies.

Building With Visual Studio
---------------------------
### Building with Visual Studio 2019

Although Visual Studio is useful for many, this package is not developed with
Visual Studio. As a result keeping the Visual Studio build files up to date
is problematic, especially since Microsoft adds incompatible file formats every
3 years. Patches of up to date Visual Studio build configurations are welcome.
The windows version is actively developed with Visual Studio 2019. It is generally
encuraged to use vcpkg to get the dependencies. All you need is libxml2 and gtest.

The sources should be buildable with MSC from version 8 (VS 2005) to version 10
(VS 2010). Just create a native dynamic library project with all files from
src and include/libxmlmm. You can build the unit tests by creating a native
win32 executable and add all files from test. You will need a copy of
UnitTest++.

Known Issues
============

* When building with MinGW it is imperitive to use a version above 4.4 and
the same exception model. If the exception model is different any exception
that tries to propagate over a DLL boundary will cause a process abort.

Documentation
=============
## Documentation

Some simple introductory documentation can be found in the docs folder.

Expand All @@ -69,14 +36,17 @@ Some simple introductory documentation can be found in the docs folder.

libxmlmm uses extensivly api documentation that can be extracted with doxygen.

Further Information
===================
## Further Information

You can find good resources on the official github page:
http://github.com/rioki/libxmlmm.

Changes
=======
## Changes

TBD libxml-0.6

* Updates build system to include VS 2019
* Changes to unit testing to gtest.

2011-08-21 libxmlmm-0.5

Expand Down Expand Up @@ -108,24 +78,23 @@ Changes
* Load and save of documents.
* Basic access API for node types.

Copying
=======
## Copying

Copyright (c) 2008-2012 Sean Farrell
Copyright (c) 2008-2020 Sean Farrell

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 changes: 4 additions & 8 deletions docs/reading-a-document.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

Reading a Document
==================
# Reading a Document

When reading a XML document with libxmlmm there are two options. You can either
navigate the document by querying each element for it's children or you can
Expand All @@ -19,8 +18,7 @@ For this example we have the following simple XML:

It is our goal to get all recipients; the names that are in the `to` elements.

Navigating the Document
-----------------------
## Navigating the Document

To navigate the document you basically use 'get_children' all the time.

Expand Down Expand Up @@ -70,8 +68,7 @@ As a simplification, the inner text of an element can be accessed though
`get_text`. It would also be possible to call `get_children` and cast the
resulting `Node` to `TextNode` and call `get_value` on it.

XPath
-----
## XPath

libxmlmm features the ability to use XPath to access values in a document.
To access single values you can use `query_string` and `query_number` and to
Expand Down Expand Up @@ -113,8 +110,7 @@ shows why this method is so useful, it make much cleaner code in those cases
where you are accessing only elements; and experience shows that when working
with XML you will probably query 80% of the time for elements.

Conclusion
----------
## Conclusion

Which approach you take depends on your use case. Basically the XPath approach
is simpler, but will probably be slower, since the XPath must be evaluated. It
Expand Down
3 changes: 1 addition & 2 deletions docs/writing-a-document.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

Writing a Document
==================
# Writing a Document

If you are creating a document you need to do this through the methods of the
Document and Node classes. This comes from the fact that libxml2 can only create
Expand Down

0 comments on commit be24994

Please sign in to comment.