spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » XML » Page 1
XML Parse based on attribute ID
You can use XPath to select the appropriate Screen element, like this Dim screenNode as XmlNode = doc.SelectSingleNode("/Main/Screen[@attribute = '35']") The part with the square brackets ([@attribute = '35']) is a condition--kind of like an If statement. The @ symbol is used to specify that you are specifying the name of an attribute rather than an element. Then you can read the sub-elemen

Categories : Xml

Last day of a month or a year in XSLT
If your processor supports only XSLT 1.0, you can determine the last day of month of any given date by calling the following named template: <xsl:template name="last-day-of-month"> <xsl:param name="date"/> <xsl:param name="y" select="substring($date, 1, 4)"/> <xsl:param name="m" select="substring($date, 6, 2)"/> <xsl:param name="cal" select="'31283130313

Categories : Xml

How to see XML output of SOAP request via vendor API using WordPress/Woocommerce
Use client like Wizdler on chrome and query the WSDL URL using the credentials you have. You will get an XML response which you can analyse Here are a few other options SOA Client - works well with firefox.

Categories : Xml

get array result with wsdl and complexType
My Web Service: function pagos($fecha){ require_once "include/conexion.php"; $result = sqlsrv_query2(" consulta"); $datos = array(); $c=0; while($row = sqlsrv_fetch_array($result)){ for($i = 0; $i<6;$i++){ $datos[$c][$i]=$row[$i]; } $c++; } return $datos; //devuelvo un array multidimensional de 6 columnas } $server->AddFun

Categories : Xml

Same xml element in different places
You can use @XmlElements: @XmlElements({ @XmlElement(name="Foo", type=Foo.class), @XmlElement(name="Bar", type=Bar.class) }) public List<Goo> fooOrBar; This assumes Foo and Bar have a common superclass Goo. (In the worst case the have the common superclass Object.) Another option is @XmlElementRefs, but that's a bit more complicated.

Categories : Xml

How to post XML data to plone view and return xml data to sender?
Your example code is not consistent. You define a view called "robot" and are using a the class value ".receive.Robot". That doesn't suit to your class definition where the class is called "Receive". Anyway - suitable to your configure.zcml the content of the receive.py file should be like this: from Products.Five import BrowserView class Receive(BrowserView): """ some docstring """ de

Categories : Xml

Should a REST service expose a XSD for XML responses?
Why not? If you are communicating via XML then you can add schemaLocation attribute to specify your schema URL. Otherwise how client can validate server XML and form its own requests properly?

Categories : Xml

Querying a log file with multiple XML objects
That is not a well-formed XML documument as @glenatron points out. You only have two options here if you want to process it as XML: 1) Wrap the elements in a root element to create a well-formed document 2) Break that file into many small XML documents. I am not sure what tools you have available to you, but if I was reading it from Java, I would probably create a custom sub-classed InputStream

Categories : Xml

How to set sorter of a List in Controller in SAPUI5?
onInit should be fine. Use List's method bindItems to bind the items and apply the sorter. Something like: oList.bindItems('/list', ListItemTemplate, foo.bar.CustomSorter); Regards, Kimmo

Categories : Xml

XSLT Creating repetitive elements from Complex XML with Field and Metadata ids
I wonder if something like this could work for you: XSLT 1.0 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:key name="fname" match="FieldDefinition" use="@guid" /> <xsl:template match="/"> <root> <xsl:fo

Categories : Xml

and in a xml element
You have to declare CHAMP as a mixed content model. This means that CHAMP can contain either #PCDATA (parsed character data) or MESSAGE. (You can still have CDATA sections in the mixed content model.) This has to be declared a certain way, so you won't be able to limit the number of occurrences of MESSAGE. It's zero or more #PCDATA or MESSAGE in any order. Example: <!DOCTYPE CHAMP [ <!

Categories : Xml

XML Nodes to be inserted with XSLT into a second Stylesheet
It appears you need to use xsl:copy-of. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/data/text-german"> <xsl:copy-of select="./*"/> </xsl:template> </xsl:stylesheet> You'll likely have to adapt the a

Categories : Xml

wso2 esb smooks un/edifact 96a EDI to XML
Comrades, After much searching and inquiring, managed to find a partial solution, but fully functional. I mean, first you must correctly identify the path where you will read the EDIFACT mapping as follows: <?xml version="1.0" encoding="UTF-8"?> <localEntry xmlns="http://ws.apache.org/ns/synapse" key="smooks"> <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"

Categories : Xml

A complex type without an element in XSD
Of course it is possible. There is no requirement to always have an element of that type. To answer the question of @RabvidDog5150, why would someone want this, there may be a number of reasons. Your complex type may be abstract (abstract base types which some other types will derive from later on). Your schema may be some kind of a "base schema", other schemas will import and extend it. Even i

Categories : Xml

Convert rows of spreadsheet to separate XML files
I would go the xslt2 path. Save the file as csv, and then you can use a xslt template such as : http://andrewjwelch.com/code/xslt/csv/csv-to-xml_v2.html to convert it to xml. Edit the template to create a new xsl:result-document whenever you want your new file. Basically you should edit the lines containing <row> <xsl:variable name="lineItems" select="fn:getTokens(.)" as="xs:string+"

Categories : Xml

XSLT mapping with metadata and field tags with multiple repetitive elements
It is difficult to understand the structure of your input. There is only one Record (although the count says 40), and it has another Record nested inside it. I am not sure how exactly you want to handle this. Here's something you could use as your starting point, though: XSLT 1.0 edited <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="

Categories : Xml

Scala - Getting the error scala.xml.NodeSeq
You are mixing up the types. Menu takes List[String] and not scala.xml.NodeSeq. You get the error, because you are passing the whole node (scala.xml.NodeSeq), not just the content of it. I can recommend this blogpost to review for further explanation: http://alvinalexander.com/scala/how-to-extract-data-from-xml-nodes-in-scala I would recommend to get your representation right first always. The

Categories : Xml

XSLT - get value of all nodes with the same name
Either you need to use an XSLT 2.0 processor like Saxon 9 or XmlPrime and make sure your stylesheet has version="2.0" as in that case you should get both values or with an XSLT 1.0 processor you need to use <xsl:for-each select="PRICES//PRICE_DATE"><xsl:value-of select="."/></xsl:for-each> respectively <xsl:apply-templates select="PRICES//PRICE_DATA"/> to make sure all sele

Categories : Xml

XSLT string join error
You will need to use an XSLT 2.0 or 3.0 processor like Saxon 9 from http://saxon.sourceforge.net/ if you want to use that function as it was introduced in 2007 in XSLT/XPath 2.0 and the XSLT processor in the Oracle/Sun JRE only supports XSLT 1.0 from 1999.

Categories : Xml

How do I parse XML web service in Swift?
You should use the NSXMLParser in your completion handler for the request: let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { (data, response, error) in if data == nil { println("dataTaskWithRequest error: (error)") return } let parser = NSXMLParser(data: data) parser.delegate = self parser.parse() // you can now check the value o

Categories : Xml

Creating a complexType from multiple complexTypes
You don't give any sample code, so it is difficult to say what you exactly want to solve and how, but it sounds like you could try using <xs:group> element. Form a group of the common elements that contains the element's requirements and then refer to this group from your two complex types at a proper moment.

Categories : Xml

XSL repeating the same value but counting the correct number of different values
I am guessing you want to change: <xsl:apply-templates select="$wfb/WFB/PLACE/NAME"/> to; <xsl:apply-templates select="NAME"/> or just simply to: <xsl:value-of select="NAME"/>

Categories : Xml

trying to export a complex xml from excel 2013
You can export the Excel data in an Excel-provided XML format by saving the workbook as XML Speadsheet 2003 (*.xml) file. Then you can write and apply a XSLT script to transform the data from one schema to another. But it may be easier to use the Excel VBA and maybe even to export the data in different format acceptable by the "different application". It may be also useful to do some data clean

Categories : Xml

vb.net XML For loop
Like this - notice Take(10) at the end: For Each book As XElement In xmlRoot.<book>.Take(10) Take is an extension method on IEnumerable, you can use it with anything, not just XElements.

Categories : Xml

Chrome 39 XML/XSLT Renders Blank Page
The link works in Firefox but results in blank page in Chrome. I checked with webdev tools and noticed that Chrome loads the xsl files from a different url as Firefox, e.g. .._layout/arena/language.xsl (404) instead of ../_layout/language.xsl (ok). In addition in Chrome I get the error message "Resource interpreted as Stylesheet but transferred with MIME type application/xslt+xml: "http://redempti

Categories : Xml

How to make a drop down menu using xslt and xml?
You can not just put the for-each in the stylesheet, it needs to be part of a template. <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/selectlist"> <xsl:for-each select="selectName"> <option VALUE="{memberName}"> <xsl:value-of select="memberName"

Categories : Xml

xslt tokenize() and "Not a node item" error
Assuming the code that triggers the error is in the named template links, then the issue is you are no longer in the context of the source XML document. You are inside an xsl:for-each on a tokenised string, so the context is an atomic value (i.e. a single string). <xsl:for-each select="tokenize(a,';')"> This means the root() function will not work because the context is a string, and not

Categories : Xml

Perl dies on big XML file, using STDIN
That's an XML error, not a Perl error. It does suggest you've got broken XML. You can trap it by eval in the parse. But actually - thinking about it - the problem is probably that you're only reading the first line of STDIN with your parse. Try adding: { local $/; $twig -> parse ( <STDIN> ); } However, for large XML files, I quite like XML::Twig, because it has a purge met

Categories : Xml

How to use custom sorter in XML views
I debugged BindingParser and seems like "formatter", "factory" and "groupHeaderFactory" resolve as reference as you want but "filters" and "sorters" resolve as a static object. So in xml binding this is not supported you should open feature request https://github.com/SAP/openui5/issues

Categories : Xml

distinct-values, contains function failed
i find workaround <xsl:variable name="sources"> <xsl:for-each select="distinct-values(root()//gml:edge/@source)"> <xsl:value-of select="."/><xsl:text>;</xsl:text> </xsl:for-each> in this way, fn:contains works fine

Categories : Xml

Xslt code for fetching name value basing on the id value given in input
How about this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:variable name="consumerInfoDoc" select="document('local:///details.xml')"/> <xsl:template match="/*"> <xsl:variable name="inputId" select="id" /> <xsl:variable name="matchData" select="$consumerI

Categories : Xml

Don´t preload images in XML (google maps API v3)
You don't have to care about these images. Before you click the markers it's simply a string, no images will be loaded. Only when you click on the marker this string will be used to create a <img/>-node inside the infoWindow(what will force the download)

Categories : Xml

rename and send all child nodes based on value of element in child node in xslt
You first need to start off with the XSLT identity template, which on its own copies all the nodes in the XML as-is <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> This means you only need to write templates for the nodes you wish to transform. You want to change Report_ID elements into R

Categories : Xml

pivoting three XML values using XSLT
As you didn't provide part of the XML as example, it's just a guess. But in case the name of the node/column in the input XML is Count, it could work if you change <xsl:value-of select="count" /> into <xsl:value-of select="Count" /> Update: As mentioned in the comments, the column name is count, so it's not an issue of the naming. I've just created an example input, not knowing

Categories : Xml

How to add suffix numbers at end of XML tags?
According to me, your XML file is not well formed. Can't you try the following: $xml = @" <Computers> <hostcount>2</hostcount> <hostconfig> <host> <hostname>host1.fqdn.local</hostname> <hostroot>root2</hostroot> <hostpassword>p@ssw0rd2</hostpassword> </host> <host> <hostname>host

Categories : Xml

How to require one, or the other, or both child elements
The easiest change to the XSD would be make both optional via minOccurs="0": <xs:element name="scheduled_times"> <xs:complexType> <xs:sequence> <xs:element ref="arrival_time" minOccurs="0"/> <xs:element ref="departure_time" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element>

Categories : Xml

Add Header to WCF Message
IDispatchMessageInspector is you friend here, have a look at this post for ideas.

Categories : Xml

Printing XML encoded Text.XML.HaXml.SAX.SaxElement elements
To create a Show instance for SaxElement you can use the StandaloneDeriving pragma like this: {-# LANGUAGE StandaloneDeriving #-} import Text.XML.HaXml.SAX deriving instance Show SaxElement You will get a warning about creating an "orphan" instance, but this is not a problem for debugging or testing.

Categories : Xml

How to query XML with complex types
I need to return the id from the element for all nodes that have a "Y" in the elements Item3 through Item3B. The right answer depends on the exact "rules" for selecting nodes. It's not clear whether you are always looking for Item3 through Item3B or if they are just examples of the rule. I also assume that by "nodes have a 'Y' in the elements" you mean they have an attribute value wich equals

Categories : Xml


Recently Add
Creating Charts using XSL, XML
XML Parse based on attribute ID
Last day of a month or a year in XSLT
How to see XML output of SOAP request via vendor API using WordPress/Woocommerce
get array result with wsdl and complexType
Same xml element in different places
How to post XML data to plone view and return xml data to sender?
Should a REST service expose a XSD for XML responses?
Querying a log file with multiple XML objects
How to set sorter of a List in Controller in SAPUI5?
XSLT Creating repetitive elements from Complex XML with Field and Metadata ids
and in a xml element
XML Nodes to be inserted with XSLT into a second Stylesheet
wso2 esb smooks un/edifact 96a EDI to XML
A complex type without an element in XSD
Convert rows of spreadsheet to separate XML files
XSLT mapping with metadata and field tags with multiple repetitive elements
Scala - Getting the error scala.xml.NodeSeq
XSLT - get value of all nodes with the same name
XSLT string join error
How do I parse XML web service in Swift?
Creating a complexType from multiple complexTypes
XSL repeating the same value but counting the correct number of different values
trying to export a complex xml from excel 2013
vb.net XML For loop
Chrome 39 XML/XSLT Renders Blank Page
How to make a drop down menu using xslt and xml?
xslt tokenize() and "Not a node item" error
Perl dies on big XML file, using STDIN
How to use custom sorter in XML views
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.