[phpXML] RE: [phpXML] Re: [phpXML] miss-match
Brought to you by:
bs_php,
nigelswinson
From: <wl...@bl...> - 2001-10-08 17:30:20
|
<blah1> Text<blah2>more</blah2>text. </blah> this is the patch i did. if ($highlight) $xml .= ">\n"; else $xml .= ">\n"; - if $highlight array is present then write ">\n"; - else write the regular way for output to xml. - did that for both the opening and closing tag in get_file() I always use <[!CDATA[ ]] Whenever I have invalid characters in the string that i'm going to output to an xml document. <blah1> Text<blah2>more</blah2>text. </blah> I haven't encountered why I would use this kind of xml structure. <blah1> <blah>Text</blah> <blah>more</blah> <blah>text</blah> </blah> this has always been fine for me.. -----Original Message----- From: Ni...@Sw... [mailto:Ni...@Sw...] Sent: Wednesday, July 04, 2001 8:56 AM To: us...@li... Subject: [phpXML] Re: [phpXML] miss-match > <blah1> > Text<blah2>more</blah2>text. > </blah> > > Just wondering if this is a correct xml data structure. I'm pretty sure it is a well-formed XML structure. I'll research sometime when I'm not at work, or I was hoping someone else would answer this for me. Go check out www.w3c.org. It won't take long to confirm either way. > Cause I haven't > seen somthing like this before. <p><B>Marked up</B> bits of <strong>text</strong> will have this pattern of elements and text <i>often</i></p>. > Or is this an output from phpXML? It couldn't possibly be the output from phpXML. As I have already argued, the phpXML class is unable to represent such a structure internally, so it can't output text of this form. > Can you > be a little bit more clear on this because i haven't encountered major > problems from phpXML except when I start using complex XPath. Many XML documents never use a mix of text and elements below a node, hence you never see this issue. > I can easily write an xmlfile and read from an xmlfile but haven't tested > the replace and delete node. I'm intrigued how you manage this. When I ask phpXML to get_file. It escapes all the <> with < > and I get: <blah1> Text<blah2>more</blah2>text. </blah> This is not a well-formed XML document as it is both missing a <?xml .... ?> bit (easily added) but it more annoyingly doesn't have a root node, as the root node has been escaped by < and > so the blah1 element is no longer an element but is now text. Nigel -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |