Well, i am creating the object, but i  need more XML manipulation than
that... i need to create, modify, delete and traverse (preferably using
xpath) nodes within the document at well.

But since you said that xml is like dom, can i use the same functions to
achieve those goals?

Thanx for your help

On 7/17/07, Ala'a Ibrahim <[EMAIL PROTECTED]> wrote:
>
> ha !!!!
> you mean something like the return of an AJAX Call, well first make sure
> to get the responseXML not responseText
>
> then you can parse it with something like getElementsByTagName
>
> Something like this
>
> var aImages = xmlResponse.getElementsByTagName("Image");
>       for(i=0; i < aImages.length; i++) {
>               SlideImages[i] = aImages[i].childNodes[0].nodeValue;
>       }
>
> if you just have a text xml you can use this function I created so you
> treat it as responseXML
>
> function XmlDom() {
>       if(window.ActiveXObject) {
>               var arrSignatures = ["MSXML2.DOMDocument.5.0", 
> "MSXML2.DOMDocument.4.0",
>               "MSXML2.DOMDocument.3.0", "MSXML2.DOMDocument
> ",
>               "Microsoft.XmlDom"];
>               for (var i=0; i < arrSignatures.length; i++) {
>                       try {
>                               var oXmlDom = new 
> ActiveXObject(arrSignatures[i]);
>                               return oXmlDom;
>                       } catch (oError) {
>                               //ignore
>
>                       }
>               }
>               throw new Error("MSXML is not installed on your system.");
>       } else if (document.implementation && 
> document.implementation.createDocument) {
>               var oXmlDom = document.implementation.createDocument
> ("","",null);
>               oXmlDom.addEventListener("load", function () {
>                       this.__changeReadyState__(4);
>               }, false);
>               return oXmlDom;
>       } else {
>               throw new Error("Your browser doesn't support an XML DOM 
> object.");
>
>       }
> }
>
> Then use this objects as
>
> var oXmlDom = new XmlDom();
> oXmlDom.loadXML(sResponseText);
>
> You treat XML like and DOM :)
>
> Hope it was useful
>
> On 7/17/07, Al-Faisal El-Dajani <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
> >
> > Can anybody recommend any good XML using Javascript reference?
> >
> > Thanx in advance.
> > --
> > Al-Faisal El-Dajani
> > Phone: +962-7-77 799 781
> > P.O Box: 140056
> > 11814 Amman, Jordan
> >
> >
>
>
> --
>                                  Ala'a A. Ibrahim
> http://guru.alaa-ibrahim.com/
> >
>


-- 
Al-Faisal El-Dajani
Phone: +962-7-77 799 781
P.O Box: 140056
11814 Amman, Jordan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Jordan PHP Users Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/JoPHP
http://Jolug.org/
-~----------~----~----~----~------~----~------~--~---

Reply via email to