Morris wrote:
I know rss_php, but it doesn't fit my solution.
Is anyone able to help me with my question?
thx
2009/2/8 Nathan Rixham
Morris wrote:
Hi,
I am trying to write a programme to read a rss xml file.
...
...
scan anyone tell me how to get the url attribute? I wrote some co
Nathan Rixham wrote:
Jesús Enrique Muñoz Fernández wrote:
Maybe you could find and answer here:
*http://drupal.org/node/81037
Some people have the same problem, i was this trouble in the past and
i fix it increasing the *memory_limit *in php.ini file*
Anyway read the posts in the url that i
Stephen Alistoun wrote:
Hello all,
Need help to get the value of the node.
We know how to get the value of the city , item and itemPrice nodes below.
How do we get the value of NumberOfRooms?
$hotelElements = $xpath->query( '', $searchReponseElement );
ugh I'll keep it in mind).
The returned string is still empty.
I also unsuccessfully fetched the 'xmlns' attribute using
getAttribute(). Interestingly, although hasAttributes(void) returns
true, hasAttribute('xmlns'), and hasAttribute(' xml:lang') both re
Borden Rhodes wrote:
I'm having a pig of a time trying to figure this one out: I have an
XHTML document which I've loaded into a DOMDocument because I want to
add more tags to it. However, since I live in a bilingual country, I
want to get the document's xml:lang attribute so I know what langua
dav wrote:
Hi,
I have question about \0 character with DOM :
What to do with the character \0 ? encode this character to obtain :
? or skip the character with str_replace("\0", '',
$cdata) ?
CDATA is raw data and why it doesnt get magically encoded. If you remove
the charac
Hi Benjamin,
You really need to read the response more carefully.
Benjamin Dupuis wrote:
I've opened a bug report on bug.php.net,
Compiling PHP in 5.2.2 is working with my libxml2, but not in 5.2.4 (and 5.2.5)
but developpers say me that's not a bug : I must use XML2_DIR instead of
XML_DIR,
__getTypes() and __getFunctions() are your friends.
They tell you alot about the functions and structure of parameters and
return types.
Rob
Hurst, Michael S. wrote:
I would have to get approval before I can do that. I can probably post
a portion of the wsdl but not sure that it would be som
Tijnema ! wrote:
On 4/5/07, Sébastien WENSKE <[EMAIL PROTECTED]> wrote:
Yes it's exactly the error, see the output :
DOMDocument::schemaValidate() Generated Errors!
Error 1871: Element 'EcheanceRMC': This element is not expected. in
file:///D%3A/wamp/www/XML%20Validator/xml/Edit4.xml on lin
Ben Roberts wrote:
So really when you perform:
$dom = dom_import_simplexml($xml);
the $dom object is really created by taking a reference to the $xml
object rather than copying it? i.e. (I know this isn't real code)
$dom = dom_import_simplexml(& $xml);
Not exactly, but the idea is along
Ben Roberts wrote:
Thanks Rob. That works. And it appears to work flawlessly if you
subsequently convert it back to a SimpleXML object too:
$xml = new SimpleXMLElement($xml_file, 0, true);
$dom = dom_import_simplexml($xml);
$dom->ownerDocument->xinclude();
$xml = simplexml_import_dom($dom);
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
Eli wrote:
Rob Richards wrote:
Due to the internals of the DOM extension, you need to register the
class types that are actually instantiated and not the underlying base
DOMNode class. Unfortunately in your case this means you need to
register all of those classes separately.
$dom
Eli wrote:
registerNodeClass('DOMNode','MyDOMNode');
$dom->loadXML('');
echo $dom->firstChild->v; #<-- not outputs 10
?>
But I get the notice:
PHP Notice: Undefined property: DOMElement::$v in ...
I want the extension to be valid for all DOM nodes that are derived from
DOMNode, such as DOM
Mathijs wrote:
I have some HTML content:
Testing
ØøÅå_^{}\[~]|[EMAIL PROTECTED]"#¤%&'()*+,ÖÑܧ¿äöñüà-./:;<=>?¡Ä
Now i need to parse the HTML by getting all the class and id attributes
and replace them with something else, and after that return the modified
HTML.
Mathijs van Veluw wrote:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-16 15:37:09 +0100:
Im using DomDocument currently and i realy want to prevent it from
adding the !DOCTYPE and mabye even and etc..
Is this possible and how?
Doesn't DOMDocument *require* DTD? I thought it's eith
[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
Mario Pavlov wrote:
nope
it doesn't work like this
still the same result
I think the problem is in the way that I'm accessing the elements
how exactly this should be done ?...
Its due to default namespaces in the feed. The item elements and its
child elements are in the default namespace:
h
Hi Alex,
Alex wrote:
Hi all. I'm trying to use XPath avg(), min() and max() functions
without success. Others functions like count() or sum() works correctly.
Here is the code I'm using (PHP 5.1):
25
7
50
3
';
$xml_doc = new DOMDocument();
$
Hi Frank,
Frank Arensmeier wrote:
> Jochem, thank you for your input!
>
> So, right now I am able to access all text nodes by e.g.
>
> $nodeElement -> parentNode -> childNodes -> item(0); -> returns Lenght,
> Width and so on
> $nodeElement -> parentNode -> childNodes -> item(1); -> is empty
> $no
D. Dante Lorenso wrote:
Rob Richards wrote:
Expected behavior. See comments within code snippet.
D. Dante Lorenso wrote:
I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave
as I expect. I am under the impressing that until I call
'endElement', I should be f
Expected behavior. See comments within code snippet.
D. Dante Lorenso wrote:
I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I
expect. I am under the impressing that until I call 'endElement', I
should be free to continue adding attributes to an opened element
regardles
Riku Palomäki wrote:
Hello,
I'm having problems with DOMElement->setAttribute() -method with my php
script. I stripped down the code to this:
--
$doc = new DOMDocument();
$doc->resolveExternals = true;
$doc->loadXml('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>');
$
Oz wrote:
For some reason my PHP5 does not have DOM. ( I have the version that
comes with fedora core 5). Is there a way to activate it.
-thanks
Oz
You need to install the php-xml rpm to get the xml extensions (dom, xsl,
xmlwriter and xmlreader).
Rob
--
PHP General Mailing List (http://ww
Andreas Korthaus wrote:
Rob Richards wrote:
You can also look at using xmlwriter, when creating serialized trees,
that automatically does escaping for you.
Hm, AFAIK latest xmlwriter versions provide an OO API. Do you know
about any documentation for it?
I will try to add some time
Andreas Korthaus wrote:
I think this should be OK, or shouldn't I do it this way?
Both ways are perfectly acceptable and all up to personal preference. In
fact, to support the way you are doing it was one of the reasons why DOM
classes were allowed to be extended.
Perhaps you have seen that
Kenneth Andresen wrote:
I am having problems with the following functions where my return simply
is "#text Joe #text Smith #text unknown", it should have read
firstname Joe lastname Smith address unknown
What am I doing wrong?
You're trying to access the name of the Text node which is always
Only the version of XMLReader in CVS HEAD does at the moment.
Rob
Jared Williams wrote:
Hi,
Does PHPs XmlReader support Xinclude ? Seems libxml does reading this
post
http://mail.gnome.org/archives/xml/2004-February/msg00190.html , but the
corresponding constant seems missing in PHP
Jared Williams wrote:
PS.
Yeah, thought it was libxml, hence didn't file a pecl bug report. But
there does seem a problem with this method as can't
just have a publicId or a systemId, libxml function uses NULL as a parameter to
specify which id you don't want to use. Which we've
lost w
Jared Williams wrote:
Hi,
$writer = new XmlWriter();
...
$writer->writeDtd('html', '-//W3C//DTD XHTML 1.0 Strict//EN',
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
produces no whitespace between the public & system ids like...
http://w
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
Daevid Vincent wrote:
I have a feature request (and I'm a bit disappointed that this isn't already
in the DOMDocument, when there are nearly useless methods like
"normalize()")... Ruby has this built in. xmllint has the --format
parameter. But yet PHP's DOMDocument has no way of cleaning up the c
From: Vivian Steller
> i now can use the following syntax to set the namespaceUri of a node:
>
> $element = new DomElement("tagname", "value",
"http://namespaceUri";);
> // or
> $element = new DomElement("pref:tagname", "value",
"http://namespaceUri";);
> // works
> I thought that setting $root->prefix will set the prefix and the
> namespaceUri to the other domain... but it seems to me that the parser
> doesn't see the "xmlns:anotherprefix" as a prefix-declaration?
> maybe i just misunderstood something, so please correct me if so.
The current behavior is w
From: Christian Stocker
> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b",
> > "http://www.somedomain.de/";);
> >
> IMHO, that would be very confusing.
>
> I liked the idea by vivian with a third optional namespaceURI argument
> for the element object, so that at least you can
> Porting the setNamespace function to PHP5 would be nice. Another solution
> could be the possibility to append a namespace-node (is the
> domnamespacenode class currently used by any functions?) or the
> setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and
> updates namespaceUri
36 matches
Mail list logo