X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2Fupgrade.html;h=b649178afba506f7dffbd28fd98826af3618f81c;hb=7714ab7384828d6cda6f950a8d789ee36ca62452;hp=569c3c16910f5e7b92f81931dc725478f055cdb3;hpb=7297e26e461b4f1156ec7c9f53819d2f96519fab;p=platform%2Fupstream%2Flibxml2.git diff --git a/doc/upgrade.html b/doc/upgrade.html index 569c3c1..b649178 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -8,8 +8,7 @@ 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 @@ -25,8 +24,7 @@ incompatible changes. The main goals were:

        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 @@ -46,8 +44,7 @@ mail:

              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 @@ -57,8 +54,7 @@ mail:

                    nodes. You can spot them using the commodity function xmlIsBlankNode(node) returning 1 for such blank nodes. -
                  -

                  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.

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

                  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 @@ -83,8 +78,7 @@ compatibility. They offers the following:

                    1. 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