Search Results

Search found 58802 results on 2353 pages for 'system xml'.

Page 93/2353 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Is there any way to get Visual Studio 2008 to update .net style comments automatically?

    - by Jon Cage
    I've been writing a lot of VC++ 2008 / CLI software recently and am using the C#/CLI style documentation: /// <summary> /// Function the does stuff /// </summary> /// <param name="someParam">Specifies some option</param> /// <returns>true if it worked</returns> bool DoStuff( bool someParam ); I find myself re-typing those blocks quite frequently and frankly, it's getting repetitive. Is there any way to get Visual Studio to create / update those blocks automatically as you create new function definitions or update existing definitions?

    Read the article

  • Insert Into Two SQL Tables From XML Maintaining Relationship

    - by Thx
    I am looking to insert records from xml into two different tables. For example <Root> <A> <AValue>1</AValue> <Children> <B> <BValue>2</BValue> </B> </Children> </A> </Root> Would insert a record into table A AID AValue # 1 also insert a record into table B BID AID BValue # #(Same as AID Above) 2 I have this DECLARE @idoc INT DECLARE @doc NVARCHAR(MAX) SET @doc = ' <Root> <A> <AValue>1</AValue> <Children> <B> <BValue>2</BValue> </B> </Children> </A> </Root> ' EXEC sp_xml_preparedocument @idoc OUTPUT, @doc CREATE TABLE #A ( AID INT IDENTITY(1, 1) , AValue INT ) INSERT INTO #A SELECT * FROM OPENXML (@idoc, '/Root/A',2) WITH (AValue INT ) CREATE TABLE #B ( BID INT IDENTITY(1, 1) , AID INT , BValue INT ) INSERT INTO #B SELECT * FROM OPENXML (@idoc, '/Root/A/Children/B',2) WITH ( AID INT, BValue INT ) SELECT * FROM #A SELECT * FROM #B DROP TABLE #A DROP TABLE #B Thanks!

    Read the article

  • How do I make a serilaization class for this?

    - by chobo2
    Hi I have something like this(sorry for the bad names) <root> <product></product> <SomeHighLevelElement> <anotherElment> <lowestElement> </lowestElement> </anotherElment> </SomeHighLevelElement> </root> I have something like this for my class public class MyClass { public MyClass() { ListWrapper= new List<UserInfo>(); } public string product{ get; set; } public List<SomeHighLevelElement> ListWrapper{ get; set; } } public class SomeHighLevelElement { public string lowestElement{ get; set; } } But I don't know how to write the code for the "anotherElement" not sure if I have to make another wrapper around it.

    Read the article

  • Parse particular text from an XML string

    - by Dan Sewell
    Hi all, Im writing an app which reads an RSS feed and places items on a map. I need to read the lat and long numbers only from this string: http://www.xxxxxxxxxxxxxx.co.uk/map.aspx?isTrafficAlert=true&lat=53.647351&lon=-1.933506 .This is contained in link tags Im a bit of a programming noob but im writing this in C#/Silverlight using Linq to XML. Shold this text be extrated when parsing or after parsing and sent to a class to do this? Many thanks for your assistance. EDIT. Im going to try and do a regex on this this is where I need to integrate the regex somewhere in this code. I need to take the lat and long from the Link element and seperate it into two variables I can use (the results are part of a foreach loop that creates a list.) var events = from ev in document.Descendants("item") select new { Title = (ev.Element("title").Value), Description = (ev.Element("description").Value), Link = (ev.Element("link").Value), }; Question is im not quite ure where to put the regex (once I work out how to use the regex properly! :-) )

    Read the article

  • jquery XML .html() instead of .text() is not displaying?

    - by Xtian
    I can't seem to figure out this problem. I am trying to get xml to render html tags. The problem I am having using .text() will display but not recognize any html tags. If I use .html() or just call var long2 = $(this).find('long'); nothing will show up in Safari or IE. I have xml paragraph I have text in here that needs bold tags or tags which is why i need html tags in the xml to be recognized. Code: $(document).ready(function(){ $.ajax({ type: "GET", url: "xml/sites.xml", dataType: "xml", success: function(xml) { $(xml).find('site').each(function(){ var id = $(this).attr('id'); var title = $(this).find('title').text(); var Class = $(this).find('class').text(); $('<div class="'+Class+'" id="link_'+id+'"></div>').html('<p class="title">'+title+'</p>').appendTo('#page-wrap'); $(this).find('desc').each(function(){ var url = $(this).find('url').text(); var long = $(this).find('long').text(); $('<div class="long"></div>').html(long).appendTo('#link_'+id); $('#link_'+id).append('<a href="http://'+url+'">'+url+'</a>'); var long2 = $(this).find('long'); $('<div class="long2"></div>').html(long2).appendTo('#link_'+id); }); }); } });

    Read the article

  • Is there a way of leveling/compressing the sound system-wide?

    - by JethroDawnfine
    As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function. We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio. Any suggestion?

    Read the article

  • Counting unique XML element attributes using XSLT

    - by patrick_corrigan
    I've just started using XSLT and am trying to figure this out. Your help would be greatly appreciated. Example XML file <purchases> <item id = "1" customer_id = "5"> </item> <item id = "2" customer_id = "5"> </item> <item id = "7" customer_id = "4"> </item> </purchases> Desired HTML Output: <table> <tr><th>Customer ID</th><th>Number of Items Purchased</th></tr> <tr><td>5</td><td>2</td></tr> <tr><td>4</td><td>1</td></tr> </table> Customer with id number 5 has bought 2 items. Customer with id number 4 has bought 1 item.

    Read the article

  • How to transform huge xml files in java?

    - by fx42
    As the title says it, I have a huge xml file (GBs) <root> <keep> <stuff> ... </stuff> <morestuff> ... </morestuff> </keep> <discard> <stuff> ... </stuff> <morestuff> ... </morestuff> </discard> </root> and I'd like to transform it into a much smaller one which retains only a few of the elements. My parser should do the following: 1. Parse through the file until a relevant element starts. 2. Copy the whole relevant element (with children) to the output file. go to 1. step 1 is easy with SAX and impossible for DOM-parsers. step 2 is annoying with SAX, but easy with the DOM-Parser or XSLT. so what? - is there a neat way to combine SAX and DOM-Parser to do the task?

    Read the article

  • Problems parsing Google Data Booksearch API XML in Ruby

    - by FrogBot
    I'm trying to parse some XML I've gotten from the Google Data Booksearch API and I'm having trouble trying to target a specific element. Currently my code looks like so: require 'gdata' client = GData::Client::BookSearch.new feed = client.get("http://books.google.com/books/feeds/volumes?q=Foundation").to_xml books = [] feed.elements.each('entry') do |entry| book = { :title => entry.elements['title'].text, :author => entry.elements['dc:creator'].text, :book_id => entry.elements['dc:identifier'].text } books.push(book) end p books and that all works fine, but I want to add a thumbnail URL to the book hash. The tag with each book's thumbnail URL looks like so: <feed> <entry> ... <link rel="http://schemas.google.com/books/2008/thumbnail" type="image/x-unknown" href="http://bks6.books.google.com/books?id=ID5P7xbmcO8C&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_gdata"/> ... </entry> </feed> I want to grab the contents of the href attribute from this element and I'm not exactly sure how. Can anyone help me out here?

    Read the article

  • Not able to transform my xml to other xml

    - by vineet
    Input XML <?xml version="1.0" encoding="UTF-8" ?> <Z_RFC_SP_POTEXT_OUT > <ZMPO_TXT> <item> <LIFNR>0009002008</LIFNR> <ZPOTEXT1>BSE-TSE Statement document is accpeted by [email protected] on 2010-04-12</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009002008</LIFNR> <ZPOTEXT1>Ist Part</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009002008</LIFNR> <ZPOTEXT1>2nd Part</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000013</LIFNR> <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000017</LIFNR> <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000017</LIFNR> <ZPOTEXT1>1st part</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000017</LIFNR> <ZPOTEXT1>2nd part</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000022</LIFNR> <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000026</LIFNR> <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> </ZMPO_TXT> </Z_RFC_SP_POTEXT_OUT> I am looking for the output <?xml version="1.0" encoding="UTF-8" ?> <Z_RFC_SP_POTEXT_OUT > <ZMPO_TXT> <item> <LIFNR>0009002008</LIFNR> <ZPOTEXT1>BSE-TSE Statement document is accpeted by [email protected] on 2010-04-12 Ist Part 2nd Part</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000013</LIFNR> <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000017</LIFNR> <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk 1st part 2nd part</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000022</LIFNR> <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> <item> <LIFNR>0009000026</LIFNR> <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> <ZPOTEXT2 /> <FLAG /> </item> </ZMPO_TXT> </Z_RFC_SP_POTEXT_OUT> Can any one help me out how to do that using xslt. Its very urgent Thanks Vineet

    Read the article

  • Flex barChart and XML Data

    - by theband
    <Projectlist> <Project> <ProjectName>Alcoswitch - ToggleSwitches </ProjectName> <ProjectStatusname>Planning</ProjectStatusname> </Project> <Project> <ProjectName> Transverse Wedge</ProjectName> <ProjectStatusname>Canceled</ProjectStatusname> </Project> <Project> <ProjectName>High Speed Pluggable I/O</ProjectName> <ProjectStatusname>In-Progress</ProjectStatusname> </Project> <Project> <ProjectName>"High Speed Pluggable I/O - Product Breakouts:</ProjectName> <ProjectStatusname>In-Progress</ProjectStatusname> </Project> <Project> <ProjectName>Circular Plastic Connector (CPC)</ProjectName> <ProjectStatusname>In-Progress</ProjectStatusname> </Project> </Projectlist> This is my XML data i am recieving, how can i show this in a bar chart. <mx:BarChart id="barChart" showDataTips="true" dataProvider="{ProjectStateInfo}" width="100%" height="100%"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="ProjectStatusname"/> </mx:horizontalAxis> <mx:verticalAxis> <mx:CategoryAxis categoryField="ProjectName"/> </mx:verticalAxis> <mx:series> <mx:BarSeries id="barSeries" visible="true" yField="ProjectName" xField="ProjectStatusname" displayName="ProjectStatusname" /> </mx:series> </mx:BarChart> My X-Axis shows muliple values of In-Progress, but i just need one. Is it possible to represent such relationship using BarChart. Any other Flex chart is Advisable.

    Read the article

  • Parsing XML with VB.net.

    - by SuperFurryToad
    I'm trying to make sense of a big data dump of XML that I need to write to a database using some VB.net code. I'm looking for some help getting started with the parsing code, specifically how to access the attribute values. <Product ID="523233" UserTypeID="Property" ParentID="523232"> <Name>My Property Name</Name> <AssetCrossReference AssetID="173501" Type=" Non Print old"> </AssetCrossReference> <AssetCrossReference AssetID="554740" Type=" Non Print old"> </AssetCrossReference> <AssetCrossReference AssetID="566495" Type=" Non Print old"> </AssetCrossReference> <AssetCrossReference AssetID="553014" Type="Non Print"> </AssetCrossReference> <AssetCrossReference AssetID="553015" Type="Non Print"> </AssetCrossReference> <AssetCrossReference AssetID="553016" Type="Non Print"> </AssetCrossReference> <AssetCrossReference AssetID="553017" Type="Non Print"> </AssetCrossReference> <AssetCrossReference AssetID="553018" Type="Non Print"> </AssetCrossReference> <Values> <Value AttributeID="5115">Section of main pool</Value> <Value AttributeID="5137">114 apartments, four floors, no lifts</Value> <Value AttributeID="5170">Property location</Value> <Value AttributeID="5164">2 key</Value> <Value AttributeID="5134">A comfortable property, the apartment is set on a pine-covered hillside - a scenic and peaceful location.</Value> <Value AttributeID="5200">YYY</Value> <Value AttributeID="5148">facilities include X,Y,Z</Value> <Value AttributeID="5067">Self Catering. </Value> <Value AttributeID="5221">Frequent organised daytime activities</Value> </Values> </Product> </Product> Thanks in advance for your help.

    Read the article

  • remove xml tags with XSLT

    - by azathoth
    Hello all I have the following xml file: <xfa:data> <form1> <Page1> <Page2> <contractInfo> ... </contractInfo> <paymentInfo> ... </paymentInfo> </form1> <commercialType> .... </commercialType> <userList> ... </userList> <officesList> ... </officesList> <commercialType> .... </commercialType> <userList> ... </userList> <officesList> ... </officesList> <commercialType> .... </commercialType> <userList> ... </userList> <officesList> ... </officesList> </xfa:data> I want to remove every ocurrence of the commercialType, userList and officesList nodes, so my output would be : <xfa:data> <form1> <Page1> <Page2> <contractInfo> ... </contractInfo> <paymentInfo> ... </paymentInfo> </form1> </xfa:data> How could I do that using XSLT? Thank you

    Read the article

  • Two unordered list from this XML data

    - by Daniel
    Hi I have this XML: <Tekstside id="1081" level="3" nodeName="Test" urlName="test"> <umbracoRedirect /> <overskrift>Test</overskrift> <tekst></tekst> <sidensTitel /> <sidensBeskrivelse /> <sidensNgleord /> - <Faktaboks id="1113" level="4" nodeName="Det her virker" urlName="det-her-virker"> <umbracoNaviHide>1</umbracoNaviHide> - <fordele> - <values> <value>Ingen emission</value> <value>Det virker bare</value> <value>Det er top nice</value> <value>Det er bare fedt</value> <value>Udstødnings</value> <value /> </values> </fordele> - <ulemper> - <values> <value>Giver sygdom</value> <value>Er farligt</value> <value /> </values> </ulemper> </Faktaboks> </Tekstside> I want the "fordele" values and the "ulemper" values made into the unorderes lists with XSLT in Umbraco: <div class="fanda"> <ul class="for"> <li>Købsprisen</li> </ul> <ul class="against"> <li>Kortere servicerings interval pga. additivet fylder med i filteret.</li> <li>Der kan forekomme meget varieret modtryk, isærpå biler med lav - udstødningstemperatur.</li> <li>Udgifter til Additiv - typisk fra 400 - 600 kr. pr. liter.</li> <li>Kan ikke klare alle kørselsmønstre</li> </ul> </div>

    Read the article

  • Adding objects to an NSMutableArray, order seems odd when parsing from an XML file

    - by diatrevolo
    Hello: I am parsing an XML file for two elements: "title" and "noType". Once these are parsed, I am adding them to an object called aMaster, an instance of my own Master class that contains NSString variables. I am then adding these instances to an NSMutableArray on a singleton, in order to call them elsewhere in the program. The problem is that when I call them, they don't seem to be on the same NSMutableArray index... each index contains either the title OR the noType element, when it should be both... can anyone see what I may be doing wrong? Below is the code for the parser. Thanks so much!! #import "XMLParser.h" #import "Values.h" #import "Listing.h" #import "Master.h" @implementation XMLParser @synthesize sharedSingleton, aMaster; - (XMLParser *) initXMLParser { [super init]; sharedSingleton = [Values sharedValues]; aMaster = [[Master init] alloc]; return self; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { aMaster = [[Master alloc] init]; //Extract the attribute here. if ([elementName isEqualToString:@"intro"]) { aMaster.intro = [attributeDict objectForKey:@"enabled"]; } else if ([elementName isEqualToString:@"item"]) { aMaster.item_type = [attributeDict objectForKey:@"type"]; //NSLog(@"Did find item with type %@", [attributeDict objectForKey:@"type"]); //NSLog(@"Reading id value :%@", aMaster.item_type); } else { //NSLog(@"No known elements"); } //NSLog(@"Processing Element: %@", elementName); //HERE } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if(!currentElementValue) currentElementValue = [[NSMutableString alloc] initWithString:string]; else { [currentElementValue appendString:string];//[tempString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; CFStringTrimWhitespace((CFMutableStringRef)currentElementValue); } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"item"]) { [sharedSingleton.master addObject:aMaster]; NSLog(@"Added %@ and %@ to the shared singleton", aMaster.title, aMaster.noType); //Only having one at a time added... don't know why [aMaster release]; aMaster = nil; } else if ([elementName isEqualToString:@"title"]) { [aMaster setValue:currentElementValue forKey:@"title"]; } else if ([elementName isEqualToString:@"noType"]) { [aMaster setValue:currentElementValue forKey:@"noType"]; //NSLog(@"%@ should load into the singleton", aMaster.noType); } NSLog(@"delimiter"); NSLog(@"%@ should load into the singleton", aMaster.title); NSLog(@"%@ should load into the singleton", aMaster.noType); [currentElementValue release]; currentElementValue = nil; } - (void) dealloc { [aMaster release]; [currentElementValue release]; [super dealloc]; } @end

    Read the article

  • Restructuting XML Data

    - by Frank
    Hi! The following is an excerpt of my XML data source: <file> <ALL_INSTANCES> <instance> <ID>1</ID> <start>5.8633333333</start> <end>29.8216666667</end> <code>Player 1</code> </instance> <instance> <ID>2</ID> <start>28.4566666667</start> <end>51.1450000000</end> <code>Player 2</code> </instance> <instance> <ID>3</ID> <start>49.8383333333</start> <end>71.1150000000</end> <code>Player 3</code> </instance> <instance> <ID>4</ID> <start>72.9850000000</start> <end>95.3766666667</end> <code>Speler 1</code> </instance> </ALL_INSTANCES> I'm looking to restructure this data into something like this: <Player 1> <ID>1</ID> <start>5.8633333333</start> <end>29.8216666667</end> </Player 1> <Player 1> <ID>4</ID> <start>72.9850000000</start> <end>95.3766666667</end> </Player 1> <Player 2> <ID>2</ID> <start>28.4566666667</start> <end>51.1450000000</end> </Player 2> <Player 3> <ID>3</ID> <start>49.8383333333</start> <end>71.1150000000</end> </Player 3> Could anyone please help me to achieve this? Much appreciated! Cheers, Frank

    Read the article

  • XML Schema for a .NET type that inherits and implements

    - by John Ruiz
    Hi, Please consider the following three .NET types: I have an interface, an abstract class, and a concrete class. My question is how to write the XML Schema to include the properties from the interface and from the abstract class. public interface IStartable { bool RequiresKey { get; set; } void Start(object key); } public abstract class Vehicle { uint WheelCount { get; set; } } public class Car : Vehicle, IStartable { public bool RequiresKey { get; set; } public string Make { get; set; } publilc string Model { get; set; } public Car() {} public void Start(object key) { // start car with key } } I don't know how to complete this schema: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="cars" xmlns="cars" xmlns:c="cars"> <!-- How do I get car to have vehicle's wheelcount AND IStartable's RequiresKey? --> <xs:element name="Car" type="c:Car" /> <xs:complexType name="Car"> <xs:complexContent> <xs:extension base="c:Vehicle"> <xs:group ref=c:CarGroup" /> </xs:extension> </xs:complexContent> </xs:complexType> <xs:group name="CarGroup"> <xs:sequence> <xs:element name="Make" type="xs:token" /> <xs:element name="Model" type="xs:token" /> </xs:sequence> </xs:group> <xs:complexType name="Vehicle"> <xs:sequence> <xs:element name="WheelCount" type="xs:unsignedInt" /> </xs:sequence> </xs:complexType> <xs:complexType name="IStartable"> <xs:sequence> <xs:element name="RequiresKey" type="xs:boolean" /> </xs:sequence> </xs:complexType> </xs:schema>

    Read the article

  • Configuring web.xml for webservices and servlet.

    - by Win Man
    Hi, I am new to Restlets. Trying to configure the web.xml (on JBoss). I have 2 entries, one for a servlet (got nothing to do with webservices) other for webservices, using Restlet. Here are the entries.. <servlet> <servlet-name>AuthenticationServlet</servlet-name> <servlet-class>com.safeid.web.server.api.servlet.AuthenticationServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>AuthenticationServlet</servlet-name> <url-pattern>/authenticate/*</url-pattern> </servlet-mapping> <!-- Start of Entries for the REST Web Services. --> <context-param> <param-name>org.restlet.application</param-name> <param-value>com.safeid.web.server.SafeIDRouterApplication</param-value> </context-param> <servlet> <servlet-name>RestletServlet</servlet-name> <servlet-class>com.noelios.restlet.ext.servlet.ServerServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>RestletServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <!-- END of Entries for the REST Web Services.--> Both don't work together. In the above setup the Restlet works. However when I change the RestletServlet /* to something like <servlet-mapping> <servlet-name>RestletServlet</servlet-name> <url-pattern>/credential/*</url-pattern> </servlet-mapping> the Restlet stop working and the AuthenticationServlet works fine. What am I missing here?

    Read the article

  • Parsing Data in XML and Storing to DB in Python

    - by Rakesh
    Hi Guys i have problem parsing an xml file and entering the data to sqlite, the format is like i need to enter the chracters before the token like 111,AAA,BBB etc <DOCUMENT> <PAGE width="544.252" height="634.961" number="1" id="p1"> <MEDIABOX x1="0" y1="0" x2="544.252" y2="634.961"/> <BLOCK id="p1_b1"> <TEXT width="37.7" height="74.124" id="p1_t1" x="51.1" y="20.8652"> <TOKEN sid="p1_s11" id="p1_w1" font-name="Verdanae" bold="yes" italic="no">111</TOKEN> </TEXT> </BLOCK> <BLOCK id="p1_b3"> <TEXT width="151.267" height="10.725" id="p1_t6" x="24.099" y="572.096"> <TOKEN sid="p1_s35" id="p1_w22" font-name="Verdanae" bold="yes" italic="yes">AAA</TOKEN> <TOKEN sid="p1_s36" id="p1_w23" font-name="verdanae" bold="yes" italic="no">BBB</TOKEN> <TOKEN sid="p1_s37" id="p1_w24" font-name="verdanae" bold="yes" italic="no">CCC</TOKEN> </TEXT> </BLOCK> <BLOCK id="p1_b4"> <TEXT width="82.72" height="26" id="p1_t7" x="55.426" y="138.026"> <TOKEN sid="p1_s42" id="p1_w29" font-name="verdanae" bold="yes" italic="no">DDD</TOKEN> <TOKEN sid="p1_s43" id="p1_w30" font-name="verdanae" bold="yes" italic="no">EEE</TOKEN> </TEXT> <TEXT width="101.74" height="26" id="p1_t8" x="55.406" y="162.026"> <TOKEN sid="p1_s45" id="p1_w31" font-name="verdanae" bold="yes" italic="no">FFF</TOKEN> </TEXT> <TEXT width="152.96" height="26" id="p1_t9" x="55.406" y="186.026"> <TOKEN sid="p1_s47" id="p1_w32" font-name="verdanae" bold="yes" italic="no">GGG</TOKEN> <TOKEN sid="p1_s48" id="p1_w33" font-name="verdanae" bold="yes" italic="no">HHH</TOKEN> </TEXT> </BLOCK> </PAGE> </DOCUMENT> in .net it is done with 3 foreach loops 1. for "DOCUMENT/PAGE/BLOCK" 2."TEXT" 3. "TOKEN" and then it is entered into the DB i dont get how to do it in python and i am trying it with lxml module

    Read the article

  • Save/Load jFreechart TimeSeriesCollection chart from XML

    - by IMAnis_tn
    I'm working with this exemple wich put rondom dynamic data into a TimeSeriesCollection chart. My problem is that i can't find how to : 1- Make a track of the old data (of the last hour) when they pass the left boundary (because the data point move from the right to the left ) of the view area just by implementing a horizontal scroll bar. 2- Is XML a good choice to save my data into when i want to have all the history of the data? public class DynamicDataDemo extends ApplicationFrame { /** The time series data. */ private TimeSeries series; /** The most recent value added. */ private double lastValue = 100.0; public DynamicDataDemo(final String title) { super(title); this.series = new TimeSeries("Random Data", Millisecond.class); final TimeSeriesCollection dataset = new TimeSeriesCollection(this.series); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); final JPanel content = new JPanel(new BorderLayout()); content.add(chartPanel); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); setContentPane(content); } private JFreeChart createChart(final XYDataset dataset) { final JFreeChart result = ChartFactory.createTimeSeriesChart( "Dynamic Data Demo", "Time", "Value", dataset, true, true, false ); final XYPlot plot = result.getXYPlot(); ValueAxis axis = plot.getDomainAxis(); axis.setAutoRange(true); axis.setFixedAutoRange(60000.0); // 60 seconds axis = plot.getRangeAxis(); axis.setRange(0.0, 200.0); return result; } public void go() { final double factor = 0.90 + 0.2 * Math.random(); this.lastValue = this.lastValue * factor; final Millisecond now = new Millisecond(); System.out.println("Now = " + now.toString()); this.series.add(new Millisecond(), this.lastValue); } public static void main(final String[] args) throws InterruptedException { final DynamicDataDemo demo = new DynamicDataDemo("Dynamic Data Demo"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); while(true){ demo.go(); Thread.currentThread().sleep(1000); } } }

    Read the article

  • Manually iterating over a selection of XML elements (C#, XDocument)

    - by user316117
    What is the “best practice” way of manually iterating (i.e., one at a time with a “next” button) over a set of XElements in my XDocument? Say I select the set of elements I want thusly: var elems = from XElement el in m_xDoc.Descendants() where (el.Name.LocalName.ToString() == "q_a") select el; I can use an IEnumerator to iterate over them, i.e., IEnumerator m_iter; But when I get to the end and I want to wrap around to the beginning if I call Reset() on it, it throws a NotSupportedException. That’s because, as the Microsoft C# 2.0 Specification under chapter 22 "Iterators" says "Note that enumerator objects do not support the IEnumerator.Reset method. Invoking this method causes a System.NotSupportedException to be thrown ." So what IS the right way of doing this? And what if I also want to have bidirectional iteration, i.e., a “back” button, too? Someone on a Microsoft discussion forum said I shouldn’t be using IEnumerable directly anyway. He said there was a way to do what I want with LINQ but I didn’t understand what. Someone else suggested dumping the XElements into a List with ToList(), which I think would work, but I wasn’t sure it was “best practice”. Thanks in advance for any suggestions!

    Read the article

  • XML String into a DataGridView (C#)

    - by Justin Daniels
    I am currently working with a webservice to pull a report about users in a remote support system. After pulling my report and receiving the result, I am given the following string back by the method: <report><header><field id="0">Source</field><field id="1">Session ID</field><field id="2">Date</field><field id="3">Name</field><field id="24">Technician Name</field><field id="25">Technician ID</field></header><data><row><field id="0">Email</field><field id="1">55037806</field><field id="2">4/13/2010 2:28:06 AM</field><field id="3">Bill Gates</field><field id="24">John</field><field id="25">1821852</field></row><row><field id="0">Telephone</field><field id="1">55034548</field><field id="2">4/13/2010 12:59:44 AM</field><field id="3">Steve Jobs</field><field id="24">John</field><field id="25">1821852</field></row></data></report> After receiving this string, I need to take it and display the actual data in a datagridview. I've tried putting it into an XMLDocument then reading that, but it seems to keep failing. Just interested in another set of eyes :) Application is written in C# in VS2010.

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >