X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2Fupgrade.html;h=569c3c16910f5e7b92f81931dc725478f055cdb3;hb=refs%2Fchanges%2F17%2F75517%2F1;hp=b649178afba506f7dffbd28fd98826af3618f81c;hpb=7714ab7384828d6cda6f950a8d789ee36ca62452;p=platform%2Fupstream%2Flibxml2.git diff --git a/doc/upgrade.html b/doc/upgrade.html index b649178..569c3c1 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -8,7 +8,8 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } Upgrading 1.x code
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

Upgrading 1.x code

Developer Menu
API Indexes
Related links

Incompatible changes:

Version 2 of libxml2 is the first version introducing serious backward -incompatible changes. The main goals were:

  • a general cleanup. A number of mistakes inherited from the very early +incompatible changes. The main goals were:

      +
    • a general cleanup. A number of mistakes inherited from the very early versions couldn't be changed due to compatibility constraints. Example the "childs" element in the nodes.
    • Uniformization of the various nodes, at least for their header and link @@ -24,7 +25,8 @@ incompatible changes. The main goals were:

      • a general cleanup. A numbe changed to compile against version 2.x of libxml. Here is a list of changes that I have collected, they may not be sufficient, so in case you find other change which are required, drop me a -mail:

        1. The package name have changed from libxml to libxml2, the library name +mail:

            +
          1. The package name have changed from libxml to libxml2, the library name is now -lxml2 . There is a new xml2-config script which should be used to select the right parameters libxml2
          2. Node childs field has been renamed @@ -44,7 +46,8 @@ mail:

            1. The package name have changed from libxml to libxml2, the l and formatting the document content becomes significant. So they are reported by SAX and if your using the DOM tree, corresponding nodes are generated. Too approach can be taken: -
              1. lazy one, use the compatibility call +
                  +
                1. lazy one, use the compatibility call xmlKeepBlanksDefault(0) but be aware that you are relying on a special (and possibly broken) set of heuristics of libxml to detect ignorable blanks. Don't complain if it breaks or @@ -54,7 +57,8 @@ mail:

                  1. The package name have changed from libxml to libxml2, the l nodes. You can spot them using the commodity function xmlIsBlankNode(node) returning 1 for such blank nodes.
                  2. -

                  Note also that with the new default the output functions don't add any +

                +

                Note also that with the new default the output functions don't add any extra indentation when saving a tree in order to be able to round trip (read and save) without inflating the document with extra formatting chars.

                @@ -70,7 +74,8 @@ mail:

                1. The package name have changed from libxml to libxml2, the l byte of the head of the document available for character detection.

                Ensuring both libxml-1.x and libxml-2.x compatibility

                Two new version of libxml (1.8.11) and libxml2 (2.3.4) have been released to allow smooth upgrade of existing libxml v1code while retaining -compatibility. They offers the following:

                1. similar include naming, one should use +compatibility. They offers the following:

                    +
                  1. similar include naming, one should use #include<libxml/...> in both cases.
                  2. similar identifiers defined via macros for the child and root fields: respectively xmlChildrenNode and @@ -78,7 +83,8 @@ compatibility. They offers the following:

                    1. similar include naming, one
                    2. a new macro LIBXML_TEST_VERSION which should be inserted once in the client code

                    So the roadmap to upgrade your existing libxml applications is the -following:

                    1. install the libxml-1.8.8 (and libxml-devel-1.8.8) packages
                    2. +following:

                        +
                      1. install the libxml-1.8.8 (and libxml-devel-1.8.8) packages
                      2. find all occurrences where the xmlDoc root field is used and change it to xmlRootNode
                      3. similarly find all occurrences where the xmlNode