www.webdeveloper.com
Results 1 to 7 of 7

Thread: Create output xml file

  1. #1
    Join Date
    Aug 2009
    Posts
    6

    Create output xml file

    I have xml and xsl file. Xsl file changes xml (sorts, adds attributes, etc.). How can i get new formatted xml file?

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    XSL can transform to any text based format. What exactly are you trying to accomplish?
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Aug 2009
    Posts
    6
    No no. I transform xml file to another xml file. How can i get results? This new xml file. Need i compiler or another program may be?

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Yes, yes. XML is text, just with funny rules. And if you are not going to fully explain what you are doing then you are on your own.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Aug 2009
    Posts
    6
    For example i need sort my xml file. How can i get finished xml file in file system?

  6. #6
    Join Date
    Aug 2006
    Posts
    1,886
    I'm no XML expert, but I would do that with PHP. Do you have PHP available?
    PHP Code:
    //
    // ProcessXSL accepts XML and XSL files as input, merges the two and outputs
    // whatever the XSL file spits out into a temp file. The temp file name is
    // returned.
    //
    function ProcessXSL ($xml_url,$xsl_url,$out)
        {
        
    $xml = new DomDocument();
        
    $xml->load($xml_url);

        
    $xsl = new DomDocument();
        
    $xsl->load($xsl_url);

        
    $xslt = new XsltProcessor();
        
    $xslt->importStylesheet($xsl);

        
    $transformation $xslt->transformToURI($xml,$out);
        return 
    $out;
        } 
    Dave

  7. #7
    Join Date
    Aug 2009
    Posts
    6
    Thank u all. Problem is solved.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles