I have a linq query where I am creating several classes which have a Parent property on them. I am looking for a way to set the parent property to be the class I just created. My explanation sucks; here's code of what I'm trying to do.
var query = from states in xml.Elements()
select new State
{...
Hi all,
Wondering if anyone has used the or statements in magento's layout XML for a custom module? I realise that I could check the values in the module controller or block itself, but it seems like a logical place for the logic to live.
Mage_Core uses them in catalog.xml to test for javascript. <!--<params/><if/><condition>can_loa...
I have inherited some code which involves a scheduled task that writes data (obtained from an external source) to XML files, and a website that reads said XML files to get information to be presented to the visitor.
There is no synchronization in place, and needless to say, sometimes the scheduled task fails to write the file because it...
this is my code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google AJAX Feed API - Simple Example</title>
<!--<script type=...
Is there an XMLList equivalent to Array.indexOf?
For example -
var array:Array = ['one','two'];
trace(array.indexOf('two')); // returns 1, since it's at the second position
trace(array.indexOf('three')); // returns -1, since it isn't found
... right? but what if I've got this -
var xml:XML = <list><item>one</item><item>two</item><...
I'm getting an exception with this code;
InnerException: System.InvalidOperationException
Message=The specified type was not recognized: name='Person',
namespace='', at "<"Contact xmlns=''>.
Here is the relevant code I think.
The class Person is a bare class without any anotations and doesn't inherit from any interface.
How to m...
The PayPal API has what's commonly referred to as a "Thank You page" -- basically a redirect page, after the user's gone through the Google Checkout process. What is the equivalent parameter to pass this value to via Google Checkout's XML API?
(I notice that their integration flow ends after redirecting the user to the Google checkout p...
When I try to export bug to XML using url:
http://addr/bugzilla/show_bug.cgi?id=XXX&ctype=xml field assigned_to has different content when:
I'm logged to my account and browsing from firefox (assigned_to has user@host)
I'm not logged and trying to get xml output from shell script (assigned_to has user without host)
I investigated...
what would be the best way to parse, for example, the string below and make a valid xml document out of it with java. So, for example, '\b' would be converted to <b> </b>, spaces to </space>, etc. Im rather new with xml so asking this really stupid question, sorry. :)
Example string:
Lorem\B ipsum\I dolor\B sit \COLOR=RGB(255,0,0)amet\...
Hello,
I want to write a java code to read the input XML file and generate its equivalent Java code.
enter code here
<CodeMarkers classname="CodeGenerator" access="public">
<MethodMarker javadoc="Compares two strings" name="stringComparator" access="private" static="no" return="boolean">
<Input name="str1" notnull="true"/>
...
I've tried lxml and eventually had to write the whole code for saving object as xml which isn't perfect. I suppose there is a neat way to do it but I just can't find it.
I'm looking for something more like pyxser. Unfortunately pyxser xml code looks different from what I need.
For instance I have my own class Person
Class Person:
...
Web app. Get data from services in json & xml formats. And from internal module in hash.
Decided to choose one format for all stored data.
details :
More read than write.
Data low nested (< 10).
Char count between 1000 - 100000.
Programming language - ruby.
Framework rails.
DB mysql.
What's your recommendation?
...
Hello Guys,
i have serious problems accessing nodes of a specific xml file:
http://write.fm/cqsmrf5
with print_r i get the following result:
SimpleXMLElement Object
(
[RecordSet] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataSource] => testdatabase
...
I already coded my own XML/XPath API used to manage properties for my game objects, but it is not updatable on the fly and does not reflect directly any game object. So now I would like to make it updatable at runtime using all best guideline available.
I have also some questions about collaterals API:
1) what file monitoring API can ...
JSON and XML are both frequently called to be context-free languages - they are both specified mainly by a formal grammar in EBNF. However this is only true for JSON as defined in RFC 4329, section 2.2 which does not require uniqueness of object keys (many may not know but {"a":1,"a":2} is valid JSON!). But if you require unique keys in ...
Here's an example of an XML file created in InfoPath:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution solutionVersion="1.0.0.1" productVersion="12.0.0" PIVersion="1.0.0.0" href="file:///C:\Metastorm\Sample%20Procedures\InfoPath%20samples\Template1.xsn" name="urn:schemas-microsoft-com:office:infopath:Template1:-myXSD-20...
I scanned 2,8GB XML file for positions (Index) of particular tags. The I use Seek method to set a start point in that file. File is UTF-8 encoded.
So indexing is like that:
using(StreamReader sr = new StreamReader(pathToFile)){
long index = 0;
while(!sr.EndOfStream){
string line = sr.ReadLine();
index += (line.Length + 2);...
Hi there,
I'm looking at using Subversion for managing WSDL and XSD artefacts, where I have a service catalogue of around 60 services. Does anyone know of any articles recommending best practice around this with regards to the granularity between tagging and versions of services.
With SVN, it appears that you can only tag from the tru...
In VB.NET I can easily embed strings into XML literals using <xml><%= "my string" %></xml>.
How can I embed an XElement instance?
I know I can use methods on the XElement, XNode, etc classes, but I'd like to do it in the XML literals if possible.
...
I'm hacking the OOXML format with XPath and it contains some 0-based arrays.
What I want to do is get the indices of individual elements.
For example:
<parentNode>
<childNode type="string" />
<childNode type="integer" />
<childNode type="boolean" />
</parentNode>
Here I can find the desired element with the expression "/...