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
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 =
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
$dom-loadHTML($website_data); //load all
DOM container in PHP
$dom-loadHTML($website_data); //load all the fetched data into the DOM
container
$inputs = $dom-getElementsByTagName('input'); // Find Sections
foreach ($inputs as $input) { //*** this block has the guts of the
functionality ***
if(!$input-getAttribute
, 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 chart does not help much. Does anyone have a PHP DOM chart or a
resource that i can use to get started using this?
When I get stuck
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 issue is, but mind if I
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 working *
$inputs2 = $dom-getElementsByTagName('textarea'); // Find textareas
foreach ($inputs2 as $input2
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
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);
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 = new
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 .
http://www.jonasjohn.de/lab/htmlsql.htm ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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 ;
[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 everything else
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters mpet...@mac.com 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 -
/*
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters mpet...@mac.com 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
On Wed, Mar 11, 2009 at 3:06 PM, Michael A. Peters mpet...@mac.com wrote:
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters mpet...@mac.com
wrote:
If I'm manipulating a dom object, is there a way to change the tag name?
I know you manipulate just about everything
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 3:06 PM, Michael A. Peters mpet...@mac.com wrote:
Andrew Ballard wrote:
On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters mpet...@mac.com
wrote:
If I'm manipulating a dom object, is there a way to change the tag name?
I know you manipulate just
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) at
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.
This is
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
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've seen 'real coders'
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
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.
Hi,
I have question about \0 character with DOM :
?php
$cdata = 'foo' . \0 . 'bar';
$dom = new DOMDocument('1.0', 'utf-8');
$dom-formatOutput = true;
$container = $dom-createElement('root');
$blob = $dom-createElement('blob');
On Sun, Mar 16, 2008 at 1:50 AM, dav [EMAIL PROTECTED] wrote:
Hi,
I have question about \0 character with DOM :
?php
$cdata = 'foo' . \0 . 'bar';
$dom = new DOMDocument('1.0', 'utf-8');
$dom-formatOutput = true;
$container = $dom-createElement('root');
$blob =
Nathan Rixham wrote:
but assuming the above file is:
?xml version=1.0 ?
chapter xmlns:xi=http://www.w3.org/2001/XInclude;
a /
/chapter
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
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 Jessen
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
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,
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..
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:
Help??
I need to get the namespaces from the root node of a DomDocument..
?xml version=1.0 ?
chapter xmlns:xi=http://www.w3.org/2001/XInclude;
para
xi:include href=book.xml
/xi:include
/para
/chapter
I know I can retrieve the namespaceUri from the xi:include node using
lookupNamespaceURI
:
And
PropertyIsEqualTo
PropertyNamegenus/PropertyName
Literalontophaugs332/Literal
/PropertyIsEqualTo
Or/
Or/
/And
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
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), I'm getting a little more success to manipulate XML.
From the code you
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 just want to
keep only
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 (Filter) and
incrustate this tag in a predefined XML. This original XML is like this:
...
Rule
Filter
PropertyIsEqualTo
PropertyNameuserID
[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 input types, say something
like a real grid, or maybe a modal child popup?
[/snip]
[potential holy war bits]
There is
?
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 really closely to the PHP
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 input types, say something
like a real grid, or maybe a modal child popup?
--
@~@ Might, Courage, Vision, SINCERITY.
On Thu, July 26, 2007 7:39 am, Man-wai Chang wrote:
Does Web 2.0 or maybe 3.0 offer some new input 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.
:-)
--
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
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
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 decoded;
[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 state that I
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
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
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:
Greetings,
I
it would add a lot of 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
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
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
:
#1513;#1500;#1493;#1501;
Although the string is already in UTF-8. The DOMDocument is already
initialized with version 1.0 and encoding UTF-8, the php file is in
UTF-8, the xml file is in UTF-8 and got ?xml version=1.0
encoding=UTF-8? header.
Example:
?php
$dom = new DOMDocument('1.0
:
?php
$dom = new DOMDocument('1.0','utf-8');
$dom-loadXML(htmlbodyשלום/body/html);
$output = $dom-saveHTML();
header(Content-Type: text/html; charset=UTF-8);
echo $output;
?
-thanks
Did you set the UTF8 format in the html_entity_decode function?
so your code would become:
?php
$dom = new
Tijnema ! wrote:
Did you set the UTF8 format in the html_entity_decode function?
so your code would become:
?php
$dom = new DOMDocument('1.0','utf-8');
$dom-loadXML(htmlbodyשלום/body/html);
$output = $dom-saveHTML();
header(Content-Type: text/html; charset=UTF-8);
echo html_entity_decode($output
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
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:
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):
bDOMCharacterData-appendData
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/
php/dom
for the remote server(http://bushidodeep.com/
php/dom/appendData/appendData.php):
bDOMCharacterData-appendData example/b
?php
$doc = new DomDocument;
//Load the xml file into DOMDocument
$doc-Load('./employee.xml');
//We retreive the attibute named id of the employee element
$employee = $doc
On Wed, February 21, 2007 11:44 pm, Eli wrote:
Peter Lauri wrote:
This was not clear for me, do you mean:
a peter = a id=peter
No.
Let me try to be more clear..
Say you got the element elem key=peter , then I want the
DOMDocument
to automatically convert the 'key' attribute to an
Eli wrote:
Let me try to be more clear..
Say you got the element elem key=peter , 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
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
, 2007 12:42 AM
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 can
Peter Lauri wrote:
This was not clear for me, do you mean:
a peter = a id=peter
No.
Let me try to be more clear..
Say you got the element elem key=peter , then I want the DOMDocument
to automatically convert the 'key' attribute to an ID-Attribute, as done
with DOMElement::setIdAttribute()
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
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
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 = 'rootchild_elementblah/child_element/root';
$doc = new DOMDocument(
Crude outside-the-box work-around...
You are only looking for div and /div and what's between them, right?
Playing with strpos and a simple stack for nested DIVs should let you
hack this in a crude parser:
?php
//Untested code, off the top of my head:
$divs = array();
$stack = array();
$offset
Try the properties innerHTML or outerHTML, the later will include the
enclosing tag.
Satyam
- Original Message -
From: Michael Williams [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, September 14, 2006 2:12 AM
Subject: [PHP] DOM Question. No pun intended.
Hi All
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 or outerHTML, the later will include
: [PHP] DOM Question. No pun intended.
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
[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 call:
$doc-saveXML($node);
Rob
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 List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
[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
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()
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).
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
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
- 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 for
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.
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 ){
echo
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 td fields on an external html page, where I just
know some ids of the rows.
Example:
...
tr id = 'tr01'
td1/tdtd2/tdtd3/tdtd4/td
/tr
tr id = 'tr02'
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: php-general@lists.php.net
Sent: Monday, September 11, 2006 11:11 PM
Subject: [PHP
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 td fields on an external html page, where
I just know some ids of the rows.
Example:
...
tr id = 'tr01'
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('path
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
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
Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
the -saveHTML() method ... outputs as `option selected`
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,
Steve Clay wrote:
Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
the -saveHTML() method ... outputs as `option selected`
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
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 `option selected`
I need my output HTML to conform to XHTML strict.
Since XHTML is XML, try -saveXML()?
Steve
I've tried that, and it
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 ?xml and ?
$html = str_replace(?xml, , $html);
$html = str_replace(?, , $html);
Would that even work?
On 1/23/06 2:52 PM, Chris
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 reading
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
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
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',
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:
?xml version=1.0 encoding=UTF-8 ?
Notes
Petr Smith wrote:
but it encloses it to CDATA section automatically like this:
script type=text/javascript
language=Javascript![CDATA[alert('ddd');]]/script
but I need it like this (because otherwise the javascript don't work):
script type=text/javascript language=Javascript
//![CDATA[
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:
script type=text/javascript
language=Javascript![CDATA[alert('ddd');]]/script
but I need it like this (because
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 = !DOCTYPE html PUBLIC \-//W3C//DTD XHTML 1.0 Strict//EN\
\http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\;\n .
\n .
html xmlns=\http://www.w3.org/1999
1 - 100 of 133 matches
Mail list logo