|
I am not sure what you are trying to do but if you are trying to edit the XML you recieve as a string in a DataGridView you might consider trying something like this:
DataSet ds = new DataSet();<br />
string s_invoices = string.Empty; <br />
System.IO.StringReader reader = new System.IO.StringReader(s_invoices);<br />
ds.ReadXml( reader);<br />
dataGridView1.DataSource = ds;<br />
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Kindly help me with the following queries:
I'm using MSXML 4.0 in the SAX(2) parsing mode. I'm working on a desktop application in C++. Request you to resolve the following queries?
1. Does MSXML offers an equivalent of XMLUni::fgSAX2CoreValidation feature provided by the Xerces-c parser? From my understanding, the schema validation in xerces is configured using the XMLUni::fgXercesSchema and XMLUni::fgXercesSchemaFullChecking features and in MSXML same is done using the IXMLDOMSchemaCollection2Ptr interface and the schema-validation feature. However, I could not figure out a feature/property in MSXML corresponding to the coreValidation feature of the Xerces-c parser. MSDN states that MSXML 3.0 does not support setting of the "http://xml.org/sax/features/validation" feature. The same when tried using MSXML 4.0 also returns E_INVALIDARG.
2. The call to IXMLDOMSchemaCollection2Ptr->add () fails with a file not found (-2146697210) error. Could you please tell what should be passed as the namespace, and whether passing name of the DTD alone as the second parameter would be sufficient. {Is their some way through which the referred DTD can be resolved by invoking the ResolveEntity () function of the EntityResolver at this point also - The same DTD when referred through the DOCTYPE declaration in the xml, is resolved through a call to ResolveEntity () which in turn fetches the contents of the DTD from a DLL that houses that DTD.} There is no way I can pass an absolute path to the DTD that is actually a resource in a DLL.
3. What is the recommended way to populate the pointer to VARIANT, which is an Out parameter to the ResolveEntity () function of the EntityResolver. On using the CopyTo function on a local CCOMBstr, a constant memory leak is reported on every parsing-iteration of the same XML. Upon reaching a high number of iterations, the parser randomly (or, maybe it follows a pattern) stops reporting elements of the XML being parsed to the ContentHandler. Is this something to do with the Delayed Garbage Collection of MSXML? Could some one please tell how to disable this feature.
Satnam Singh Anand
-- modified at 8:16 Wednesday 3rd May, 2006
|
|
|
|
|
Hi,
i have just completed a xsd schema and could not wait to get my hands to the new xmlObjectDataSource and was slapped in the face when i realized that i can not use the xmlObjectDataSource with an xmlnamespace ( DO WHAT ? )
Anyway, i am hoping that someone can help tell me how to do this without removing the namespace?
erik
|
|
|
|
|
( writed as C++ )
Description of class CXmlFile :
+ Data members :
m_tagRoot // Stores root tag (master tag) of the xml file
+ Construction & destruction
CXmlFile //Contructs a CXmlFile objiects
~CXmlFile //Destructs a CXmlFile objiect
+ Operations
LoadTags //Loads the root tag and its child tags in an xml file into memory and store the root tag in m_tagRoot member.
Open //Opens an xml file. This method is also used to creat a new xml file.
close //Closes an xml file.
GetRootTag //Returns pointer point to the root tag.
+ Status
IsReadMode //Returns bool value which specifies whether the xml file is in read mode.
IsWriteMode //Returns bool value which specifies whether the xml file is in write mode.
Thanks ! ^_^
My Email : vietsoft2006@yahoo.com
Perseverance for success !
Myhomepage : http://www.bacninh.tk
Welcome my countryside !
My Email : vietsoft2005@yahoo.com
-- modified at 23:45 Friday 28th April, 2006
|
|
|
|
|
I'm not shure if this is the right place to post this message...
I'm trying to align my tables as to display them next to each other. The reason for my not all in one table is because i dont know the amount of columns or rows and thus dump all the data in one of each staff members table.
I can align the tables in xml and xsl, the problem i'm having is when i try to align the tables in FOP(Formatting Objects Processing) to create a pdf.
Does anyone know how to align tables next to each other in FOP. I've read up on how to align them beneath each other but i can't find an example of one where they are next to each other.
Plz help, any and all comments will be appreciated.
He who laughs last...
|
|
|
|
|
Enjoy the long weekend
He who laughs last...
|
|
|
|
|
suppose i have the folloing XML:
<bookstore>
<book>
<title> AAA</title>
<author> bbb</author>
<price> 40 </price>
</book>
</bookstore>
& i want "title" for example as a return element, at the same time it is the predicate element.. how to make this expression?
i tried:
//title[.='AAA']
& it didn't work?!
|
|
|
|
|
Hi!
try the following...
bookstore/book/title
It will return u the value - AAA
============================ A finite loop!
for (int i=0; i<=1; i++) if (i == 1) i = 0; ============================
|
|
|
|
|
Try //title[text()='AAA']?
|
|
|
|
|
Think Stuart is nearly correct, but it does not reach the correct depth.
/bookstore/book/title =>
So 3 '/' is needed if absolute paths are needed, or '.' in front if relative from /bookstore is required.
Absolute:
Relative from /bookstore:
.
-- modified at 21:39 Thursday 27th April, 2006
|
|
|
|
|
thank u all
i went with the last soloution,absolute didn't work
|
|
|
|
|
Graham N wrote:
/bookstore/book/title => ///title
Should be:
/*/*/title
Graham N wrote:
.//title[text()='AAA']
.//title All <title> elements one or more levels deep in the current context
//title Recursive descent; searches for <title> elements at any depth. When this path operator appears at the start of the pattern, it indicates recursive descent from the root node.
So, .//title only works when the current has <title> elements as descendants.
Thus, Stuart is correct and you are nearly correct.
-- modified at 23:37 Friday 28th April, 2006
|
|
|
|
|
Ah yes!
Now that would make more sense.
It's been a while since I've done any major XML projects.
|
|
|
|
|
Hi,
In order to display logdata stored in a single xml file in a pretty way I would like to use different xsl stylesheets transforming the xml file. Each XSL file extracts a certain aspect (system information, Process information)
I would like to create a html side having a coule of links on it. Each one of them should load a xml file with a different style sheet. While browing the usual newsgroups i found out that this should be possible using javascript but how? I would like to get more details on that, so can anyone point me in the right direction?
Thanks in advance
Ingo
|
|
|
|
|
Greetings all.
Is it possible to create a schema to enforce the following issue.
If the value for required Attribute A within Element E has an enumerated value of ‘myType’ then element E also needs to have Attribute B.
Xml example below
E=Item
A=type
B=len
<Items>
<Item type=” myType” len=”5” />
<Item type=” NOTmyType” />
</Items>
Any help or a point in a semi right direction would be very helpful
-- modified at 11:27 Tuesday 25th April, 2006
|
|
|
|
|
Not with XSD, IMO - you'd need something like Schematron[^]
|
|
|
|
|
was afraid of that.
thanks for the validation
is it then common practice to have different node names to start with, and not differentiate by node type?
|
|
|
|
|
Mmmmm - yes, I guess so. Otherwise you leave verification of semantic constraints (such as the one you want to enforce) to a stage *after* XSD validation.
|
|
|
|
|
i have to import inside a sql server 2005 table a file excel saved as an xml with a column with some strings.
column
-------
sfsdfsfd
dsfsfgg
54432fd
dss43r
gdgdgdfgd43
gdfgdfg43
etc...
how can i do?
|
|
|
|
|
how can i use / in the name of element, like < I / O > < / I / O >, i am using c# and it is throwing exception.
Shajeel
-- modified at 9:09 Monday 24th April, 2006
|
|
|
|
|
|
You can't. It goes against W3C's XML specifications.
|
|
|
|
|
i was looking at the following tutorial's last topic Element Naming.
http://www.w3schools.com/xml/xml_elements.asp
it doesn't say anything about this restriction.
Shajeel
|
|
|
|
|
Hi there.
Look at section 2.3 of the XML specifications[^]
Of particular interest are rules 4 and 5 which specifies the valid range of XML element names.
Quoting from the Specification:
Names and Tokens
[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5] Name ::= (Letter | '_' | ':') (NameChar)*
[6] Names ::= Name (#x20 Name)*
[7] Nmtoken ::= (NameChar)+
[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
Both IE and Firefox have XML support, so you could create an XML file containing the element and display the file in the software. It will perform a well-formed check on files with an .xml extension and will return any errors encountered.
Regards, Graham.
-- modified at 13:07 Tuesday 25th April, 2006
|
|
|
|
|
Thanks for the help.
Shajeel
|
|
|
|