|
|
Yeah I have that... I just need a stylesheet to display it properly, and not just a bunch of text. Thanks anyway;)
// Steve McLenithan
Family Guy: Season 2 - Episode 8
|
|
|
|
|
I am creating a few modules for DNN and I want to use an XML file for each one to store the settings. Doing this would greatly reduce the pain of installing the module (not having to mess with DB scripts). I know there is a function that you can use to get the value of a key in the web.config file (can't remember its name...).
How would I go about creating a similar function of my own?
// Steve McLenithan
Family Guy: Season 2 - Episode 8
|
|
|
|
|
|
|
Awesome! That is way better
// Steve McLenithan
Family Guy: Season 2 - Episode 8
|
|
|
|
|
Glad to help.
-Nick Parker
|
|
|
|
|
Hi,
I'm trying to read a XML file in vb. I've found some code to explain how to read it using a dataset.
The problem is that I can't read sub-section of my main table DVD.
Here is the XML code of my file :
<?xml version="1.0" encoding="us-ascii"?>
<Collection>
<DVD>
<ID>099720116493.9</ID>
<UPC>099720-116493</UPC>
<Title>Les Mystérieuses Cités d'Or L'integrale</Title>
<SortTitle>Les Mystérieuses Cités d'Or L'integrale</SortTitle>
<Description>Collector's Edition</Description>
<Regions>
<Region>2</Region>
</Regions>
<CollectionType>Owned</CollectionType>
<CollectionNumber>90</CollectionNumber>
<Rating>AL</Rating>
<ProductionYear>1982</ProductionYear>
<Released>2000-10-25</Released>
<RunningTime>974</RunningTime>
<Genres>
<Genre>Animation</Genre>
</Genres>
<Format>
<FormatAspectRatio>1.33</FormatAspectRatio>
<FormatVideoStandard>PAL</FormatVideoStandard>
<FormatLetterBox>False</FormatLetterBox>
<FormatPanAndScan>False</FormatPanAndScan>
<FormatFullFrame>True</FormatFullFrame>
<Format16X9>False</Format16X9>
<FormatDualSided>False</FormatDualSided>
<FormatDualLayered>False</FormatDualLayered>
<FormatFlipper>False</FormatFlipper>
</Format>
<Features>
<FeatureSceneAccess>True</FeatureSceneAccess>
<FeatureCommentary>False</FeatureCommentary>
<FeatureTrailer>True</FeatureTrailer>
<FeatureDeletedScenes>False</FeatureDeletedScenes>
<FeatureMakingOf>True</FeatureMakingOf>
<FeatureProductionNotes>True</FeatureProductionNotes>
<FeatureGame>False</FeatureGame>
<FeatureDVDROMContent>False</FeatureDVDROMContent>
<FeatureMultiAngle>False</FeatureMultiAngle>
<FeatureMusicVideos>False</FeatureMusicVideos>
<FeatureClosedCaptioned>False</FeatureClosedCaptioned>
<FeatureTHXCertified>False</FeatureTHXCertified>
</Features>
<Studios>
<Studio>Sony Music Video</Studio>
</Studios>
<Audio>
<AudioFormat>
<AudioLanguage>French</AudioLanguage>
<AudioCompression>MPEG Audio Stream</AudioCompression>
<AudioChannels>Mono</AudioChannels>
</AudioFormat>
</Audio>
<Subtitles>
</Subtitles>
<Directors>
</Directors>
<Actors>
</Actors>
<Review>
<ReviewFilm>0</ReviewFilm>
<ReviewVideo>0</ReviewVideo>
<ReviewAudio>0</ReviewAudio>
<ReviewExtras>0</ReviewExtras>
</Review>
<SRPInfo>
<SRP>$0.00</SRP>
<SRPCurrencyID>USD</SRPCurrencyID>
<SRPCurrencyName>United States (Dollar)</SRPCurrencyName>
</SRPInfo>
<PurchaseInfo>
<PurchasePriceInfo>
<PurchasePrice>$0.00</PurchasePrice>
<PurchasePriceCurrencyID>USD</PurchasePriceCurrencyID>
<PurchasePriceCurrencyName>United States (Dollar)</PurchasePriceCurrencyName>
</PurchasePriceInfo>
<PurchaseDate>1899-12-30</PurchaseDate>
</PurchaseInfo>
<LoanInfo>
</LoanInfo>
<Overview>Rencontre avec Bernard Deyriès Filmographie Descriptif des personnages Carte interactive des sites traversés par les personnages Bandes-annonces 39 épisodes avec documentaires de fin</Overview>
<LastEdited>2003-07-27</LastEdited>
</DVD>
</Collection></code>
Thanx
Sybux
|
|
|
|
|
Hi
I would load the xmldocument into a XmlDocument-class. Then I would use SelectNodes to fetch the proper information.
Dim lstNode As XmlNodeList
Dim xmlDoc As New XmlDocument()
xmlDoc.Load("...\...path\file.xml")
lstNode = xmlDoc.SelectNodes(strChoose)
(strChoose is the "xpathway" to your information)
(For each XmlNode in XmlNodeList, do build a string, use XmlNode.ChildNodes )
Regards
// Daniel
|
|
|
|
|
Thanks for the answer.
Is it possible to know the name of the XML Element ?
In my case I'd like to know, in the order, that I'm in :
DVD
ID
UPC
Title
etc...
Sybux
|
|
|
|
|
Hi
I guess you mean XmlElement.Name ?
Regards
Daniel
|
|
|
|
|
HI,
I'm not familiar with XML name but I just want to know (from my exemple) the name of the "category" I'm in. The category for me is <id> <utc> <title> etc...
If this is XMLElement so I need to get those information from the XMLNode (if possible).
Thx
Sybux
|
|
|
|
|
Now I´m lost, I´ve found an example from MS
Imports System
Imports System.IO
Imports System.Xml
public class Sample
public shared sub Main()
Dim doc as XmlDocument = new XmlDocument()
doc.LoadXml("<book xmlns:bk="urn:samples">" & _
"<bk:isbn>1-861001-57-5" & _
"<title>Pride And Prejudice" & _
"")
'Display information on the ISBN element.
Dim elem as XmlElement
elem = CType(doc.DocumentElement.ChildNodes.Item(0),XmlElement) Console.Write("{0} = {1}", elem.Name, elem.InnerText)
Console.WriteLine(" namespaceURI=" + elem.NamespaceURI)
end sub
end class
You can try that one. XmlElement.Name gives the name of the node.
// Daniel
|
|
|
|
|
I need to process some fairly large (>.75Gb) XML files, (actually in a batch, but once I can cope with one, he said, optimistically...)
At the moment, I have used SAX and a FSA to parse and convert the data from XML to an internal format. However, the format changes rapidly, and the FSA is a pain to keep amending. The size means that DOM directly is a no-no.
What I had in mind was to match specific tags, and collect all the contained stuff into a smaller DOM document, which I can then process in a simplified way.
I've used DOM to read stuff before, and obviously, SAX, but not to write, so I'd be grateful for any hints or pointers to samples of this kind of thing, as I'm assuming I'm not the first to consider this option.
Steve S
|
|
|
|
|
I have been contemplating writing a generic calculation engine for Tax Computations, and was wondering if it would be possible to write such a thing that required each years coputational calculations to be defined in XML and data then to also be held in XML. The generic calculation component then uses the instructions in XML to explain how to do the calculation so that the same component can be used for any years tax computation, and output numerous results to a separate XML file.
I would appreciate any advice any of you "experts" can give me on such a project. Would it be possible??
|
|
|
|
|
>> Would it be possible??
Sure. Your basically talking about a XML Processor much the same as XSLT or any other. You define a language and then develop the processor right? Not that it is a simple task to complete but the concept is simple.
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
I want to add an XML listing to a web page - like having source code in a CP article. Is there a program that will convert it to XML and colour the tags etc?
Thanks
Davy
My Personal Blog - Homepage. Scottish News - Angus Blog, Perth Blog and Dundee Blog
|
|
|
|
|
Davy Mitchell wrote:
I want to add an XML listing to a web page - like having source code in a CP article. Is there a program that will convert it to XML and colour the tags etc?
You can use the HTML <xml> tag, the ASP.NET <asp:XML> tag, or an iframe with its source being an XML file.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
|
Hi, I am trying to create a generic xsl file to display query results. The column names depend upon the query, so I dont want to hardcode them. What I have is close to what I need, but I get one row of column headings for each row of data. (Just one would do!)
I can see that the for-each command in the table header is causing the problem, but I'm not sure how to select just one row. Any advise would be really helpfull. Thanks.
My data looks like this:
<?xml-stylesheet type="text/xsl" href="generic.xsl"?>
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata">
<ResultRow>
<Code>AVL1A</Code>
<Name>RED</Name>
<Quantity>9437.914</Quantity>
</ResultRow>
<ResultRow>
<Code>XYZ</Code>
<Name>BLUE</Name>
<Quantity>9437.914</Quantity>
</ResultRow></code>
And my xsl looks like this (portion):
<code><table>
<thead>
<xsl:for-each select="//ResultRow">
<tr align="center">
<xsl:for-each match=".//">
<td><strong><xsl:node-name /></strong></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</thead>
<tbody>
<xsl:for-each select="//ResultRow">
<tr><xsl:for-each match=".//">
<td><xsl:value-of /></td>
</xsl:for-each></tr>
</xsl:for-each>
</tbody>
</table></code>
Joanne
|
|
|
|
|
<thead><br />
<tr align="center"><br />
<xsl:for-each match="//ResultRow[1]/*"><br />
<td><strong><xsl:value-of select="name()" /></strong></td><br />
</xsl:for-each><br />
</tr><br />
</thead>
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Thanks, that's working now!
|
|
|
|
|
Hi,
I'm using MSXML to produce a XML Doc from a Tree Control in my VC++ program. I am getting an weird error while trying to create XMLNodes.
IXMLDOMNodePtr DOMNodePtr[100];
DOMNodePtr[i]=ptrDocIP->createElement(strRoot.AllocSysString()); //ptrDocIP is of type IXMLDOMDocumentPtr and sysRoot is CString
I'm using the above statement in a fuction and I call that fuction repeatedly to add new nodes. When I add the first nodes, I don't get any exception, but, second time I get an Exception and the program terminated.
I tried with createNode function and got the same error.
Can anybody help?
Binayak Bhattacharyya
|
|
|
|
|
whats the exception?
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hi
This probably doesn´t help but when I used
lstElement->Item(0)->NamespaceURI in creating an xmlElemnt
XmlElement *NameElement = doc->CreateElement("Name",lstElement->Item(0)->NamespaceURI);
given that doc is an XMLDocument and lstElement is of type XmlNodelist. I got it to work.
But again, I assume that there are two different problems. I added elements to an existing XMLDocument.
Regards
Daniel
|
|
|
|