Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: javascript xml parser question.

From: annoyingmouse2002@-----.--.-- (-----------------)
To: NULL
Date: 7/8/2004 7:34:00 PM
Thanks Martin, I've cobled the following code but am unsure of the
syntax for the parseXML engine on the adobe plugin...

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width='100%' height='600' onload='dessin(evt)'>
  <script><![CDATA[
    var svgdoc;

    function dessin(evt){
      svgdoc = evt.target.ownerDocument;
      loadFile();
    }

    // Load the XML Data
    function loadFile(){
      getURL("NHSTrust.owl", getData);
    }
    
    function getData(data){
      if (data.success){
        var xml = parseXML(data.content).firstChild;
        var employees = xml.getElementsByTagName("employee");
        alert('Loading has succeeded. There are '+employees.length+'
employees');
        for(a=0;a<employees.length;a++){
          alert(a+' = '+employees.item(a).getAttribute('rdf:ID'));
        }
      }
      else{
        alert('Loading has failed');
      }
    }

  ]]></script>
</svg>

I know that it's merely a question of moving up and down the DOM but
when I did this using MSXML the functions were named differently.

Cheers, Dom

Martin Honnen <mahotrash@y...> wrote in message news:<40ea934a$1@o...>...
> annoyingmouse2002 wrote:
> 
> 
> > Eventually I'll be using the arrays to do some calculations so I need
> > that structure. A bit of the output will be in the form of an SVG so I
> > was looking at using the adobe SVG plug-in's abilities to parse
> > XML...?
> 
> Check here:
> http://www.protocol7.com/svg-wiki/index.php/AdobeSVGViewer
> http://www.protocol7.com/svg-wiki/index.php/ParseXml
> http://www.protocol7.com/svg-wiki/index.php/GetUrl


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent