> I think what you are looking for is $input2->textContent in PHP.
Hey Andrew (and everyone else was was kind enough to write back) !
Found the solution, this is what i am using (and it works!), and i hope it
helps anyone else who finds themselves in the spot i found myself
$inputs2 = $dom->
Michael A. Peters wrote:
$website_data = new tidy('dom_test.html',$tidy_config);
Doh!
Should be
$website_data = new tidy('dom_test.html',$tidy_config,'utf8');
Otherwise it has the same problem with multibyte characters that
loadHTML() has. But with the 'utf8' specified it works beautifull
ntents('dom_test.html');//load the website data,
>
> $dom = new DomDocument; //make a new DOM container in PHP
> $dom->loadHTML($website_data); //load all the fetched data into the DOM
> container
>
[snip]
> // * now we come to the textarea bit that is not worki
Ryan S wrote:
$website_data = file_get_contents('dom_test.html');//load the website data,
$dom = new DomDocument; //make a new DOM container in PHP
$dom->loadHTML($website_data); //load all the fetched data into the DOM
container
I'm not sure what the answer to your iss
;
>but no joy.
>
>I'm betting its pretty simple but i dont have a "DOM chart" for php, the only
>ones i have been able to find via google are for javascript like this one:
>http://www.hscripts.com/tutorials/javascript/dom/textarea-events.php
>
>
>and that ch
_data = file_get_contents('dom_test.html');//load the website data,
>
> $dom = new DomDocument; //make a new DOM container in PHP
> $dom->loadHTML($website_data); //load all the fetched data into the DOM
> container
>
> $inputs = $dom->getElementsByTagName(
de below.
But a bit confused as to how to do the same for a textarea as textarea's do not
have a 'VALUE=' attribute.
Heres my code:
$website_data = file_get_contents('dom_test.html');//load the website data,
$dom = new DomDocument; //make a new DOM container in PHP
$
Yo!
I have a working form that adds user input to an XML file, it adds the
new "item" element to the bottom of the list of previously created
"item" elements.
I would now like the new elements to be added to the top of the list.
So far i've tried using: insertBefore() but i'm still getting
On Thu, Jul 02, 2009 at 04:29:01PM +0530, Pravinc wrote:
> Hey all,
>
> I am working with generating PDF using Dom PDF.
>
> My problem is when I generate a single PDF , Its working fine.
>
> But when I code it in a loop for generating more than one PDF it gives some
> error.
>
>$DomObj = n
Hey all,
I am working with generating PDF using Dom PDF.
My problem is when I generate a single PDF , Its working fine.
But when I code it in a loop for generating more than one PDF it gives some
error.
$DomObj = new DOMPDF();
$DomObj->load_html_file($pth);
$DomObj->
http://www.jonasjohn.de/lab/htmlsql.htm ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi
I am working on a project wherein i have to extract information from a
webpage and use it for processing. However that information becomes
available only when i manually select a part of the webpage and view its
source information (DOM source of selection ). Now i want this to be
automated . Is
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 3:06 PM, Michael A. Peters wrote:
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters
wrote:
If I'm manipulating a dom object, is there a way to change the tag name?
I know you manipulate just about everything else in a node
On Wed, Mar 11, 2009 at 3:06 PM, Michael A. Peters wrote:
> Andrew Ballard wrote:
>>
>> On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters
>> wrote:
>>>
>>> If I'm manipulating a dom object, is there a way to change the tag name?
>>> I know you manipulate just about everything else in a node - b
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters wrote:
If I'm manipulating a dom object, is there a way to change the tag name?
I know you manipulate just about everything else in a node - but is the
tagName really off limits?
from the documentation for DOMElement -
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters wrote:
> If I'm manipulating a dom object, is there a way to change the tag name?
> I know you manipulate just about everything else in a node - but is the
> tagName really off limits?
>
> from the documentation for DOMElement -
>
> /* Properties
[mailto:mpet...@mac.com]
Sent: Wednesday, March 11, 2009 1:40 PM
To: php-general@lists.php.net
Subject: Re: [PHP] DOM - change a tag name ??
Michael A. Peters wrote:
> If I'm manipulating a dom object, is there a way to change the tag name?
> I know you manipulate just about everythin
Michael A. Peters wrote:
If I'm manipulating a dom object, is there a way to change the tag name?
I know you manipulate just about everything else in a node - but is the
tagName really off limits?
from the documentation for DOMElement -
/* Properties */
readonly public bool $schemaTypeInfo ;
If I'm manipulating a dom object, is there a way to change the tag name?
I know you manipulate just about everything else in a node - but is the
tagName really off limits?
from the documentation for DOMElement -
/* Properties */
readonly public bool $schemaTypeInfo ;
readonly public string $ta
please keep replies on list ... I enjoy my
beatings in public ...
Joanne Lane schreef:
> On Tue, 2009-03-10 at 01:05 +0100, Jochem Maas wrote:
>
>> yeah but those from php-women should know better :-)
>> my eye keeps picking up php-women since I had a very nice chat
>> with JRF (of phpwomen.org)
Nathan Rixham schreef:
> Jochem Maas wrote:
>> Jochem Maas schreef:
>>> Joanne Lane schreef:
I am trying to create a class that recursively iterates over an
array an
creates XML tree to reflect a multidimensional array.
I am not really a PHP coder, but am trying my hand.
>>> I'v
Jochem Maas wrote:
Jochem Maas schreef:
Joanne Lane schreef:
I am trying to create a class that recursively iterates over an array an
creates XML tree to reflect a multidimensional array.
I am not really a PHP coder, but am trying my hand.
I've seen 'real coders' write stuff thats leagues wors
Jochem Maas schreef:
> Joanne Lane schreef:
>> I am trying to create a class that recursively iterates over an array an
>> creates XML tree to reflect a multidimensional array.
>> I am not really a PHP coder, but am trying my hand.
>
> I've seen 'real coders' write stuff thats leagues worse.
>
>>
Joanne Lane schreef:
> I am trying to create a class that recursively iterates over an array an
> creates XML tree to reflect a multidimensional array.
> I am not really a PHP coder, but am trying my hand.
I've seen 'real coders' write stuff thats leagues worse.
> This is what I have so far.
> ht
I am trying to create a class that recursively iterates over an array an
creates XML tree to reflect a multidimensional array.
I am not really a PHP coder, but am trying my hand.
This is what I have so far.
http://pastie.org/private/w75vyq9ub09p0uawteyieq
I have tried a few methods, but I keep fai
On Sun, Mar 16, 2008 at 1:50 AM, dav <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have question about \0 character with DOM :
>
>$cdata = 'foo' . "\0" . 'bar';
>
> $dom = new DOMDocument('1.0', 'utf-8');
> $dom->formatOutput = true;
>
> $container = $dom->createElement('root');
> $blob =
Hi,
I have question about \0 character with DOM :
formatOutput = true;
$container = $dom->createElement('root');
$blob = $dom->createElement('blob');
$blob->appendChild($dom->createCDATASection($cdata));
$container->appendChild($blob);
$dom->appendChild(
Cheers indeed Rob!
That DOMXPath solution is exactly what I was looking for; Many, Many Thanks,
Nathan
Rob wrote:
Hi Nathan,
Nathan Rixham wrote:
Cheers Rob,
But this is the problem, I don't know what the namespace/prefix is! ie
"xi" and the following doesn't work:
$root->getAttributeNS(
Hi Nathan,
Nathan Rixham wrote:
Cheers Rob,
But this is the problem, I don't know what the namespace/prefix is! ie
"xi" and the following doesn't work:
$root->getAttributeNS('http://www.w3.org/2000/xmlns/', '*');
further xmlns is ?not? a prefix so this won't work either..
$root->lookupPrefi
Cheers Rob,
But this is the problem, I don't know what the namespace/prefix is! ie
"xi" and the following doesn't work:
$root->getAttributeNS('http://www.w3.org/2000/xmlns/', '*');
further xmlns is ?not? a prefix so this won't work either..
$root->lookupPrefix('http://www.w3.org/2000/xmlns/')
Hi Nathan,
You need to retrieve the attribute based on the xmlns namespace.
Nathan Rixham wrote:
Thanks Jessen, I'm using the DOM API (domdocument) in PHP 5 - and yes
pull xmlns:xi="http://www.w3.org/2001/XInclude"; from the chapter or
indeed any namespaces defined in the root node and store t
Thanks Jessen, I'm using the DOM API (domdocument) in PHP 5 - and yes
pull xmlns:xi="http://www.w3.org/2001/XInclude"; from the chapter or
indeed any namespaces defined in the root node and store them in a variable.
If anybody could shed any light it'd be greatly appreciated.
Nathan
Per Jesse
Nathan Rixham wrote:
> but assuming the above file is:
>
> http://www.w3.org/2001/XInclude";>
>
>
>
> how would one retrieve xmlns:xi="http://www.w3.org/2001/XInclude";
When you say 'retrieve', what do you really mean? You need to get the
namespace value into a PHP variable?
I would probab
Help??
I need to get the namespaces from the root node of a DomDocument..
http://www.w3.org/2001/XInclude";>
I know I can retrieve the namespaceUri from the "xi:include" node using
lookupNamespaceURI and ->prefix but I need to get it from where it's
defined in "chapter"
but assumi
ontophaugs332
>
>
>
>
>
>
>
> Regards
>
> Jonas
>
> On Tue, 2007-11-20 at 10:27 -0800, pere roca wrote:
> > please, I need some help with php DOM, for me it's becoming a hell!
> >
> > After trying other methods (check message from 19
you expect:
genus
ontophaugs332
Regards
Jonas
On Tue, 2007-11-20 at 10:27 -0800, pere roca wrote:
> please, I need some help with php DOM, for me it's becoming a hell!
>
> After trying other methods (check message from 19th november, called "php
> DOM question"
please, I need some help with php DOM, for me it's becoming a hell!
After trying other methods (check message from 19th november, called "php
DOM question"), I'm getting a little more success to manipulate XML.
>From the code you can see below you generate this xml. Now I
hi everybody,
I'm starting with the php DOM tools with some success.
I want the user to dynamically alter the values of an xml tag () and
incrustate this tag in a predefined XML. This original XML is like this:
...
userID
nom U
[snip]
Out of curiosity, is there any effort in creating a new DOM that's
easier for application builders (something like Visual Foxpro)?
Does Web 2.0 or maybe 3.0 offer some new types, say something
like a real grid, or maybe a modal child popup?
[/snip]
[potential holy war bits]
There is no su
On Thu, July 26, 2007 7:39 am, Man-wai Chang wrote:
> Does Web 2.0 or maybe 3.0 offer some new types, say something
> like a real grid, or maybe a modal child popup?
No, that would be a useful feature, and browser-makers have much more
important (read: inane) features to implement.
:-)
--
Some
a modal child popup?
You're confusing two different things.
The DOM is a standard API developed by the W3C for addressing tree data
structures, generally XML or a data structure that maps to XML. It is
language-independent, which is why the Javascript DOM functions look and act
really
Out of curiosity, is there any effort in creating a new DOM that's
easier for application builders (something like Visual Foxpro)?
Does Web 2.0 or maybe 3.0 offer some new types, say something
like a real grid, or maybe a modal child popup?
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \
Hey!
I have been looking through the docs writing test code and am going a
little bit mad trying to work this out.
Does anyone know where I can find a definitive list of DOM XML functions
that are supported in specific versions of PHP?
I write my code in Zend and it has 5.2.0, so everything
I am trying to modify a node name and it mostly works, except that
appendChild seems to strip the text that FOLLOWS after a subnode.
Leading text and subnodes appear to be retained perfectly, just not text
trailing the subnode. I tried using cloneNode, but that discarded the
children even when I se
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 10, 2007 7:57 PM
To: Buesching, Logan J
Cc: Tijnema !; php-general@lists.php.net
Subject: RE: [PHP] DOM and XSLTProcessor
On Mon, April 9, 2007 3:50 am, Buesching, Logan J wrote:
> This could offer a possible workaround.
>
> Let me first sta
On Mon, April 9, 2007 3:50 am, Buesching, Logan J wrote:
> This could offer a possible workaround.
>
> Let me first state that I cannot simply do:
>
> echo htmlspecialchars_decode($proc->transformToXML($doc));
>
> If I were to do that, then it would assume that all of these encodings
> need to be d
f unnecessary overhead if it
can be avoided.
Thanks for the idea though.
-Logan
-Original Message-
From: Tijnema ! [mailto:[EMAIL PROTECTED]
Sent: Monday, April 09, 2007 4:40 AM
To: Buesching, Logan J
Cc: php-general@lists.php.net
Subject: Re: [PHP] DOM and XSLTProcessor
On 4/9/07, Buesching,
for the idea though.
-Logan
-Original Message-
From: Tijnema ! [mailto:[EMAIL PROTECTED]
Sent: Monday, April 09, 2007 4:40 AM
To: Buesching, Logan J
Cc: php-general@lists.php.net
Subject: Re: [PHP] DOM and XSLTProcessor
On 4/9/07, Buesching, Logan J <[EMAIL PROTECTED]> wrote:
&g
On 4/9/07, Buesching, Logan J <[EMAIL PROTECTED]> wrote:
Greetings,
I apologize if this is a little long, but I am trying to put as much
information as I have done in this first post. I am running PHP 5 and
attempting to use DOM to create data to show on a webpage and using
XSLTProcessor with
Greetings,
I apologize if this is a little long, but I am trying to put as much
information as I have done in this first post. I am running PHP 5 and
attempting to use DOM to create data to show on a webpage and using
XSLTProcessor with an XSLT sheet to output it into XHTML. Everything is
pre
Hi Nicholas,
Nicholas Yim wrote:
> how save() method
The save() method, or actually saveXML() method dumps the DOM in XML
format and not HTML format, and browsers do not know how to handle it
correctly.
-thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Hello Eli,
Best regards,
=== At 2007-03-21, 15:13:29 you wrote: ===
>Hi,
>
>I'm loading a utf-8 xml file into PHP5 DOM, and then use saveHTML()
how save() method
>method. The result output always convert characters to html enti
Tijnema ! wrote:
Did you set the UTF8 format in the html_entity_decode function?
so your code would become:
loadXML("שלום");
$output = $dom->saveHTML();
header("Content-Type: text/html; charset=UTF-8");
echo html_entity_decode($output,ENT_QUOTES,"UTF-8");
?>
Yes. This works... thanks! :-)
But
On 3/21/07, Eli <[EMAIL PROTECTED]> wrote:
> What about html_entity_decode?
> http://www.php.net/html_entity_decode
No. It doesn't help in this case.
DOMDocument->saveHTML() method converts any non-ascii characters into
entities.
For example, if the dom document has the text node value of:
What about html_entity_decode?
http://www.php.net/html_entity_decode
No. It doesn't help in this case.
DOMDocument->saveHTML() method converts any non-ascii characters into
entities.
For example, if the dom document has the text node value of:
שלום
It converts the string to entities:
On 3/21/07, Eli <[EMAIL PROTECTED]> wrote:
Hi,
I'm loading a utf-8 xml file into PHP5 DOM, and then use saveHTML()
method. The result output always convert characters to html entities in
any case.
How can I avoid this? I want to output utf-8 html string with no html
entities.
-thanks!
What ab
Hi,
I'm loading a utf-8 xml file into PHP5 DOM, and then use saveHTML()
method. The result output always convert characters to html entities in
any case.
How can I avoid this? I want to output utf-8 html string with no html
entities.
-thanks!
--
PHP General Mailing List (http://www.php.net/
ned for the remote server(http://bushidodeep.com/
php/dom/appendData/appendData.php):
DOMCharacterData->appendData example
Load('./employee.xml');
//We retreive the attibute named id of the employee element
$employee = $doc->getElementsByTagName('employee')->ite
ne 17
DOMCharacterData->appendData example
I attempted changing the owner of each file to System and read/
write for each file, with the same result, MAC OS 10.4.8, without
success, what steps are needed to correct this?
This source returned for the remote server(http://bushidodeep.com/
ted changing the owner of each file to System and read/write
for each file, with the same result, MAC OS 10.4.8, without success,
what steps are needed to correct this?
This source returned for the remote server(http://bushidodeep.com/php/
dom/appendData/appendData.php):
DOMCharacterData->appe
On Wed, February 21, 2007 11:44 pm, Eli wrote:
> Peter Lauri wrote:
>> This was not clear for me, do you mean:
>>
>> =>
>>
>
> No.
>
> Let me try to be more clear..
> Say you got the element , then I want the
> DOMDocument
> to automatically convert the 'key' attribute to an ID-Attribute, as
> d
Eli wrote:
Let me try to be more clear..
Say you got the element , then I want the DOMDocument
to automatically convert the 'key' attribute to an ID-Attribute, as done
with DOMElement::setIdAttribute() function. The ID-Attribute is indexed
and can be quickly gotten via DOMDocument::getElement
Peter Lauri wrote:
This was not clear for me, do you mean:
=>
No.
Let me try to be more clear..
Say you got the element , then I want the DOMDocument
to automatically convert the 'key' attribute to an ID-Attribute, as done
with DOMElement::setIdAttribute() function. The ID-Attribute is
To: php-general@lists.php.net
Subject: [PHP] DOM Element default ID attribute
Hi,
I want to declare a default ID attribute to all elements in the document.
For example: If an element got the attribute 'id' then I want it
automatically to become the ID attribute of the element.
How
Hi,
I want to declare a default ID attribute to all elements in the document.
For example: If an element got the attribute 'id' then I want it
automatically to become the ID attribute of the element.
How can I do that?
-thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi there!
I´m building a form validator using PHP and JS. It´s working fine by
now, but I want to make a little improvement. Here is how its working now:
1. The user fill the form. Every time he leaves the field, the JS
code match the value against a regexp to validate.
2. When the us
Has anyone found a workaround for this; a workaround the fact that
loadXML() completely replaces the existing document structure?
It's amazing what you find out after you've already made yourself look
foolish.
$xmlStr = 'blah';
$doc = new DOMDocument( '1.0', 'UTF-8' );
$docFragment = $doc->c
Apparently, loadXML() overwrites the existing structure of the document when
called. The problem is that when I try to add a PI (namely a stylesheet),
it adds it to the end of the document thus making so that the XML is not
transformed by the client.
To get around this, I thought I could just
Crude outside-the-box work-around...
You are only looking for
This should give you offsets to the beginning/end of each DIV tag.
I'm sure I've got a one-off error or I'm not tracking quite the right
numbers, or that I'm tracking extra numbers you don't need, but the
idea is sound.
--
Like Mus
[EMAIL PROTECTED] wrote:
Rob,
I wasn't aware that that would work. I mean I suppose it should, but
basically
this is what I'm doing:
1) Create a new DOMDocument
2) DOMDocument->loadHTML()
3) find the elements I want with getElementsByTag() then finding the
one with
the correct attributes
uot;innerHTML" or "outerHTML" in relation to PHP DOM.
I'm familiar
with them from a Javascript standpoint, but no references when it
comes to PHP
DOM.
Regards,
Mike
Now that you have the element, why not just call:
$doc->saveXML($node);
Rob
--
PHP General Mailing
[EMAIL PROTECTED] wrote:
Satyam,
I don't see any "innerHTML" or "outerHTML" in relation to PHP DOM. I'm
familiar
with them from a Javascript standpoint, but no references when it comes
to PHP
DOM.
Regards,
Mike
Now that you have the element, why not just ca
Sorry, I immediatly thought about the client side.
No, I don't know there is any way on the server side with PHP.
Satyam
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Satyam" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, September 14, 2006 4:16 PM
Subject:
Satyam,
I don't see any "innerHTML" or "outerHTML" in relation to PHP DOM. I'm
familiar
with them from a Javascript standpoint, but no references when it comes to PHP
DOM.
Regards,
Mike
Quoting Satyam <[EMAIL PROTECTED]>:
Try the properties innerHTML
Try the properties innerHTML or outerHTML, the later will include the
enclosing tag.
Satyam
- Original Message -
From: "Michael Williams" <[EMAIL PROTECTED]>
To:
Sent: Thursday, September 14, 2006 2:12 AM
Subject: [PHP] DOM Question. No pun intended.
Hi All,
I
Hi All,
I'm having HTML DOM troubles. Is there any way to output the *EXACT*
code
contained in a node (child nodes and all)? For instance, I perform a
$doc->loadHTML($file) and all
is well. I then search through the document for specific NODEs with
getElementsByTagName(). However, when I
At 10:02 PM +0200 9/13/06, Leonidas Safran wrote:
Hello Tedd,
Interesting -- it doesn't work for me. I keep getting --
Parse error: parse error, unexpected T_OBJECT_OPERATOR
-- in your if statement. But, I don't see the problem.
Maybe it has something to do with your php version. I h
Hello Tedd,
> Interesting -- it doesn't work for me. I keep getting --
> Parse error: parse error, unexpected T_OBJECT_OPERATOR
> -- in your if statement. But, I don't see the problem.
Maybe it has something to do with your php version. I have php 5.04 installed
(Fedora Core 4 rpm package).
H
At 12:07 AM +0200 9/13/06, Leonidas Safran wrote:
Hello all,
I have found a way...
$doc = new DomDocument();
$doc->loadHTMLFile($source["url"]);
$elements = $doc->getElementsByTagName("tr");
$i = 0;
while( $elements->item($i) ){
if( $elements->item($i)->hasAttributes() &&
preg_match("/td[0|
Hello all,
I have found a way...
$doc = new DomDocument();
$doc->loadHTMLFile($source["url"]);
$elements = $doc->getElementsByTagName("tr");
$i = 0;
while( $elements->item($i) ){
if( $elements->item($i)->hasAttributes() &&
preg_match("/td[0|1]/",$elements->item($i)->getAttribute("id")) > 0 ){
Hello Satyam,
> That is correct but it is not complete. Everything that relies
> on a unique id would fail, CSS amongst others(which is what this
> article covers), but not the only one.
> Basically there are two functions to get elements by id or name:
> getElementById and getElementsByName.
- Original Message -
From: "Leonidas Safran" <[EMAIL PROTECTED]>
By the way, because I found it strange to have more than one field with
the same id, I looked on the famous selfhtml tutorial website
http://de.selfhtml.org which says that unique id is only mandatory for
css, but not fo
Hello Satyam,
Thanks for your answering...
>> I don't really get it to work with that functions from
>> http://www.php.net/manual/en/ref.dom.php
>> I try to get the content of fields on an external html page, where
>> I just know some ids of the rows.
>> Example:
>> ...
>>
>> 1234
>>
>>
>>
helpful in
traversing the DOM is any tool that gives you a good view of the tree
structure. One such comes already in the Firefox browser.
Satyam
- Original Message -
From: "Leonidas Safran" <[EMAIL PROTECTED]>
To:
Sent: Monday, September 11, 2006 11:11 PM
Subje
Hello all,
I don't really get it to work with that functions from
http://www.php.net/manual/en/ref.dom.php
I try to get the content of fields on an external html page, where I just
know some ids of the rows.
Example:
...
1234
1234
1234
1234
...
PS: Please note, that id is written mor
Hi,
I am working with PHP 4.3 on windows. I am using PHP DOM functions to update
the XML file.
When I try to set the attribute of a particular node, the subsequent get
returns the set value, but it doesn't reflect in the memory structure.
echo "###",$build_node->get_attribute(
I'm having some problems using PHP5 on Windows 2000 Server, running IIS 5.
When trying to access a document from a "xmldoc()" function the system
responds with the following,
*Fatal error*: Call to undefined function xmldoc() in *"XML Document"* on
line *Number*
**
How do I fix this problem? Is t
ACK! Of course I put errors in the code. But I just read if you want to
strip out the first line that would be easy. Just use a regular expression
and take it out. :)
On 1/23/06 3:23 PM, "Jay Paulson" <[EMAIL PROTECTED]> wrote:
> I don't know much about the ->saveXML() method but after read
I don't know much about the ->saveXML() method but after reading the PHP
manual why can't you just do something like this:
$xhtml = $dom->saveXML();
// strip out the
$html = str_replace("", "", $html);
Would that even work?
On 1/23/06 2:52 PM, "Chris" <[EMAIL PROTECTED]> wrote:
> Steve Cla
On 1/23/06, Chris <[EMAIL PROTECTED]> wrote:
> Steve Clay wrote:
> >Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
> >
> >>the ->saveHTML() method ... outputs as ``
> >>I need my output HTML to conform to XHTML strict.
> >>
> >Since XHTML is XML, try ->saveXML()?
> >
> >Steve
> >
> I've tried t
Steve Clay wrote:
Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
the ->saveHTML() method ... outputs as ``
I need my output HTML to conform to XHTML strict.
Since XHTML is XML, try ->saveXML()?
Steve
I've tried that, and it suits my purposes except for the fact that it
always
Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
> the ->saveHTML() method ... outputs as ``
> I need my output HTML to conform to XHTML strict.
Since XHTML is XML, try ->saveXML()?
Steve
--
http://mrclay.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
Hi,
I have a class which will build, and output, an HTML table. To create
the internal elements more simply I'm using a DOMDocument, with a root
element of 'table' then outputting with the ->saveHTML() method.
This has worked fine during development, but I've run into a problem. In
this tabl
worked!!
"Rob Richards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Guy Brom wrote:
>> Any idea what's wrong with the following? ($this_item['description'] has
>> some html text I would like to paste as a CDATA section)
>>
>> $item->appendChild($dom->createElement('description'
Guy Brom wrote:
Any idea what's wrong with the following? ($this_item['description'] has
some html text I would like to paste as a CDATA section)
$item->appendChild($dom->createElement('description',
$dom->createCDATASection($this_item['description'])));
createElement takes a string not a DO
Any idea what's wrong with the following? ($this_item['description'] has
some html text I would like to paste as a CDATA section)
$item->appendChild($dom->createElement('description',
$dom->createCDATASection($this_item['description'])));
Thanks!
--
PHP General Mailing List (http://www.php.n
Howdy folks,
I'm using PHP 5.0.5 with the DOM enabled and I'm trying to create an XML
doc with PHP. The problem I'm having is attaching a namespace prefix to a
tag.
What I'm trying to create is something like the following:
I am unable to create the "" element with the "cac:" namespace
p
Thanks a lot Rob, it's so simple! I don't know why I did't find it myself.
Petr
Rob wrote:
Petr Smith wrote:
but it encloses it to CDATA section automatically like this:
language="Javascript">
but I need it like this (because otherwise the javascript don't work
Petr Smith wrote:
but it encloses it to CDATA section automatically like this:
language="Javascript">
but I need it like this (because otherwise the javascript don't work):
//
First, script was using some bogus method names.
Second
Hi,
I have problem with PHP DOM extension. How can I add my own javascript
to javascript tag?
I tried it using this code
$html = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\n" .
"\n" .
"http://www.w3.org/1999/xhtml\"; xml:lang
1 - 100 of 133 matches
Mail list logo