[phpXML] Re: [phpXML] miss-match
Brought to you by:
bs_php,
nigelswinson
From: <nig...@us...> - 2001-10-09 13:11:18
|
I looked into this the other day and I think it will require a fairly = major rewrite of some of the code. Currently the internal structure = only has one text parameter per node, so when it reads "Text" it adds it = to the text node of blah1, then when it reads "text" then it appends it = to the text node to get "Text text". Hence when you write it back out = the internal structure has lost the descriptive ability to Put "Text" = before <blah2> and "text" after </blah2>. In order for phpXML to support this kind of behaviour, the internal = data-structure needs to be able to associate a text block that comes = after a element. You could then assoicate "text" as the after element = text of the <blah2> tag. So in this example <blah> has text data of "Text", and <blah2> has text = data of "more" and a post-element-text-data of "text". Clearly the root = element is not allowed to have any post-element-text-data as I think = this would be invalid XML.=20 At least that's how I thought I'd do it... Fortunately I don't need = this feature for my application. So unless I get really bored I won't = be implementing this :o) Try calling print_r() on the object after you have given it an xml file = and you'll quickly see the internal structure. Incidentally, I've written a get_file_as_xml() function that dumps the = object in a format suitable for writing straight to file. When I've = finished testing I'll pass it on to you all. Nigel ----- Original Message -----=20 From: <rot...@ne...> To: <us...@li...> Sent: Wednesday, July 04, 2001 8:12 AM Subject: [phpXML] miss-match > How can I get around phpXML's tendency to place tags inside regular = text > after the tag containing the text. > i.e., > <blah1> > Text<blah2>more</blah2>text. > </blah> > Comes out >=20 > Text text.more >=20 >=20 > -- > This message has been sent through the <phpXML/> user discussion list. = To unsubscribe, please visit = https://sslsites.de/mailinglisten/user/us...@li.../ >=20 -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |