This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from saxonche import PySaxonProcessor | |
| with PySaxonProcessor() as saxon_proc: | |
| print(saxon_proc.version) | |
| xdm_node = saxon_proc.parse_xml(xml_file_name='sample1.xml') | |
| xquery_proc = saxon_proc.new_xquery_processor() | |
| result = xquery_proc.run_query_to_value(input_xdm_item=xdm_node, query_text='//item => sort()') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from lxml import etree as ET | |
| xml = ET.XML('''<order id="1021"> | |
| <items> | |
| <item code="11"> | |
| <quantity>2</quantity> | |
| <price>50</price> | |
| </item> | |
| <item code="21"> | |
| <quantity>1</quantity> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <doc>First test XML instance.</doc> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Xml.XPath; | |
| using System.Xml.Xsl; | |
| XslCompiledTransform xsltProcessor = new XslCompiledTransform(); | |
| xsltProcessor.Load("parseXmlExample1.xsl"); | |
| var xsltArguments = new XsltArgumentList(); | |
| xsltArguments.AddExtensionObject("http://example.com/mf", new XsltExtensions()); | |
| xsltProcessor.Transform("embedded-xml-sample1.xml", xsltArguments, Console.Out); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <root> | |
| <item> | |
| <value>a</value> | |
| </item> | |
| <item> | |
| <value>b</value> | |
| </item> | |
| </root> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <permissions> | |
| <privapp-permissions package="a"> | |
| <permission name="x"/> | |
| <permission name="y"/> | |
| </privapp-permissions> | |
| </permissions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| version="3.0" | |
| xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
| exclude-result-prefixes="#all" | |
| expand-text="yes"> | |
| <xsl:mode on-no-match="shallow-copy"/> | |
| </xsl:stylesheet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>Simple group-by example with a composite grouping key from XSLT 3 specification</title> | |
| </head> | |
| <body> | |
| <p>Milano, Italia: 5.26</p> | |
| <p>Padova, Italia: 0.81</p> | |
| <p>Paris, France: 7.4</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| version="3.0" | |
| xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
| exclude-result-prefixes="#all" | |
| expand-text="yes"> | |
| <xsl:param name="collection-uri" as="xs:string" select="'./?select=*.xml'"/> | |
| <xsl:output method="xml" indent="yes"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| version="3.0" | |
| xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
| exclude-result-prefixes="#all" | |
| expand-text="yes"> | |
| <xsl:param name="count" as="xs:integer" select="25"/> | |
| <xsl:output indent="yes"/> |
NewerOlder