SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,042
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)

    DOMElement named link resulting in mismatched tag

    For some unknown reason when the link_ tag is named link a mismatched tag error is occurring. This output is being generated by DOMDocument. Is there a way to resolve this without renaming the item with the underscore and are there other words I should be worried about that will result in this error?

    thanks
    Attached Images Attached Images

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,042
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Seems like saveHTML() is the problem:

    http://php.filearena.net/manual/kr/f...ument-save.php

    Not sure what the solution might be though.

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,042
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    So saveXML() seems to work fine, but that doesn't really solve the problem. So at least I know its not a error in the code.

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Its a bit hard to make out but is the last comment in the user notes not alluding to the fact that the link should be closed with the 2nd tag? Like so:
    PHP Code:
    <link_ ></link_
    If that was the case, and not the case of the underscore causing the problem, if <link_> was removed the second tag should also throw the same problem.
    PHP Code:
    <summary/> 

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,042
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Its a problem with saveHTML() that I think I'm going to have to live with and just change the tag name with the underscore if it matches meta or link.

    Quote Originally Posted by JimmyNighthawk
    +++ EMERGENCY NOT +++

    When the HTML-Specification which is implemented in ->saveHTML() is implemented in ->save() you are not able to store XML-Tags which have no End-Tags in HTML (e. g. <link>- and <meta>-Tags).

    Same in other words:
    When the HTML-Specification which is implemented in ->saveHTML() is accidently implemented in ->save() the VALUE and END-TAG of nodes will be removed/deleted, when there is no VALUE and END-TAG allowed in HTML.

    If this happens note this to your Hoster. It should be corrected immediately to perfom full benefit of XML, and perhaps your XML-database.

    Let us just say about dealed fairly: "**** happens"
    http://php.filearena.net/manual/kr/f....php#usernotes

    I rather not but I don't think I have any other choice.

  6. #6
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,396
    Mentioned
    54 Post(s)
    Tagged
    0 Thread(s)
    I'm not clear on what precisely the problem is. Could you provide a sample with which the error is repeatable?
    Salathe
    Software Developer and PHP Manual Author.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •