xml

XPath to find element based on another XPath element

Hi, I have an Java AST and I try to find a variable inside it via XPath. Lets say the variable is called 'foobar' I could use //VariableDeclarator/VariableDeclaratorId[@Image='foobar'] but what if I dont know the text 'foobar', but want to read it from another element //VariableDeclarator/VariableDeclaratorId[@Image=//Synchroni...

Diff XML matched by specific attribute

I've got XML-data generated by a tool which I want to diff against data created earlier by the same tool. The problem is that the tool might reorder elements within the XML-data and thus I need some way to tell the diff tool to base its match on one or more attributes of the elements. I've got access to Beyond Compare 2 but haven't been ...

Accessing children with a given name via jdom

I want to access the children with skos:Concept. getChildren("skos:Concept") and getChildren("Concept") both give me an empty list what should I use instead?. My example Data: <owl:AnnotationProperty rdf:about="&dc;identifier"/> <owl:ObjectProperty rdf:about="&skos;narrower"/> <skos:Concept rdf:about="#concept:0_acetylpantolactone:425...

SelectNodes and GetElementsByTagName

what are main differences between SelectNodes and GetElementsByTagName. ...

How do I create new xml from ElementTree?

Bit of a beginner question here: Say I have a block of xml: <root> <district> <house><room><door/><room></house> </district> <district> <street> <house>and so on</house> </street> etc. With ElementTree I can do: houses=doc.findall(".//house") to select all the house nodes, regardless of their parent. What I want to do...

Deleting an XML tag using C#

FIRST EDIT I'm fetching the Child 1 tag into a DropDownList in my C# form, Plz suggest the best practise code (C#) for deleting a Particular Parent tag & all it's child tags in an XML file. Example of my xml file: <Parents> <Parent> <Child 1>Something</Child 1> <Child 2>Something</Child 2> <Child 3>Some...

Getting an XML node using LINQ

Somehow, using linq I can't test it with this CUF field in the beginning: <NFe> <infNFe versao="1.0" Id="NFe0000000000"> <ide> <cUF>35</cUF> <!--...--> </ide> </infNFe> </NFe> With the following code: XDocument document = XDocument.Load(@"c:\nota.xml"); var query = from NF...

Rails - strip xml import from whitespace and line break

Hey folks, I am stuck with something quite simple but really annoying: I have an xml file with one node, where the content includes line breaks and whitspaces. Sadly I can't change the xml. <?xml version="1.0" encoding="utf-8" ?> <ProductFeed> ACME Ltd. Fooproduct Foo Root :: Bar Category I get to the nod...

XPath find element based on ancestor element

Hi, again I have Java AST which is created from public class Test { String o = new String("hh"); public void wrong1() { synchronized(o) { // huhu } } } I try to create a XPath query which finds the synchronized block in which the defined String variable o is used. As the definition is above it...

to add textfield in an array to movieclip in as3 flash

I want to add array containing textfield to movieclip and the following statement doesn't work for loop { myMov.addChild(myArray[i].person); } person is the xml node and xml has root employee and nodes person and content in CDATA Hope someone helps! Thanks in advance! ...

Best way to find updates in xml feed

Hello all, I have an xml feed that I have to check periodically for updates. The xml consists of many elements and I'm looking to figure it out which is the best (and probably faster) way to find out which elements suffered updates from last time I've checked. What I think of is to check first the lastBuildDate for modifications and i...

Reading XML into Silverlight Data Grid

I am trying to read in a simple XML file, however when I run the SQL it always returns Ennumeration Yeilded no results. Not sure what I am going wrong. XDocument xmlInfo = XDocument.Parse(xmlContent); XNamespace ns = xmlInfo.Root.Name.Namespace; XNamespace ns = xmlBuilderInfo.Root.Name.Namespace; var Info = from XMLtagin xmlInfo.D...

TypeError 1009, XML and AS3

My animation is advanced forward, but it's frozen. It throws a TypeError 1009. How do I get rid of this error and get it to play? download http://sandboxfun.weebly.com/ XML <?xml version="1.0" encoding="utf-8"?> <SESSION> <TIMER TITLE="speed">1000</TIMER> <COUNT TITLE="starting position">10000</COUNT> </SESSION> FLA //DynamicTex...

Android - need UI help/advice

I have been working on Android for the past couple of months getting to know how various components work. One area I am completely lacking in knowledge is any sort of User Interface or graphical interface creation. As an excercise I have been asked to break down the HTC call screen into what components it contains and rebuild as close ...

xsd:keyref from hierarchical nodes structure

I try to refer with an xsd:keyref from within a node/subnode structure to a global table that is child of the xml root element. Here is an example xml <?xml version="1.0" encoding="UTF-8"?> <Root xmlns="http://www.example.org/keyTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/keyTe...

Merging two XML files in Flex

Does anyone know how to merge two xml files in or two xmllist objects in Flex3 ActionScript? Thanks. ...

Convert XML file to CSV

After having converted a messed up XML using regex, I now need to change it yet again. This source file <product> <sku>SP00001</sku> <PID_OWNER_SellerID>StoreName</PID_OWNER_SellerID> <EANCode>8711983489813</EANCode> <DeliveryDays>2</DeliveryDays> </product> Has to become a CSV file, but like this: sku field ...

Making an XSL stylesheet work with paged XML

First off, here is the situation. I'm using a guild hosting site that allows you to input the URL to an XSL file and another input for the XML. All well and good when all of the XML you want is contained in one file. My problem is this Game Roster XML which is paginated... look near the bottom of the file and you will find a <page_links...

XML Schema to restrict one field based on another

I have the following schema, which I use to ensure that a person's PhoneNumber and PhoneNumberType (Home, Work, etc.) is not longer than 10 characters. However, I want to improve this schema so that PhoneNumberType is not required if a PhoneNumber is not provided, but is required if the PhoneNumber is provided. Is there a way to do this ...

Prevent Character Escape When Calling XmlWriter.WriteElementString

I have a string <entry key="Provider">Comcast Cable Communications, Inc.</entry> <entry key="Challenged">No</entry> I need to call the using xmlwriter.WriteElementString I need to what the string mentioned earlier. Problem here is the xwriter.WriteElementString will escape all "<" and ">" symbols with &lt and &gt. I have checked...