|
http://www.net4manpower.com need software developer for exam realted software and also freelance wrbdesigner need for website with file uploading facility.
net4manpower offer 1000 freelance jobs for professionals
contact us:net4info@gmail.com
net4manpower
|
|
|
|
|
I need to fetch all the chapter Id,Sec1 id and head,Sec2 Id and Name, Sec3 Id and name untill it collects the whole datas from the book
/*
<book>
<chap1 id="ch01lev1sec1">
<chaptitle>XmlXchemas
<page id="Page_387">
<emphasis type="BoldItalic">Hungry Minds, Inc. End-User License Agreement
<sec1 id="ch01lev1sec1">
<page id="Page_387">
<emphasis type="BoldItalic">Hungry Minds, Inc. End-User License Agreement
<sec2 id="ch01lev2sec1">
<page id="Page_387">
<emphasis type="BoldItalic">Hungry Minds, Inc. End-User License Agreement
<sec2>
<sec1>
<sec1 id="ch01lev1sec1">
<page id="Page_387">
<emphasis type="BoldItalic">Hungry Minds, Inc. End-User License Agreement
*/
VanithaVasu
|
|
|
|
|
hi
i want to parse an XML file and extract the fields.is theer any generic parser in VC++ 8 (or even C++) so that even if i add one more tag to my XML file with little modification the program should work.
thnx in advance......
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
If you are considering using XML in your software I strongly urge you to spend some time learning the XML technology space before making decisions about how your going to use XML in your software. This might prove a sizable learning curve since the XML space is quite large now.
You could start here[^] but I don't suggest you consider that sufficient.
led mike
|
|
|
|
|
I need to add an xml-node to my xml file, which later i will validate. Is there any way to know the exact location where i need to add that node so that validation does not fail?
Thanks in Advance.
|
|
|
|
|
I work primarily with C++ and trying to get a handle on XML. Consider the following class of data:
classA
{
CString name;
int widgits[3];
}
Lets assume the data for the items in the class is:
name = "Bob"
widgits = {1,6,9}
If I was to create an XML file to hold data such as that above, how would the array of widgits be represented?
Would it look something like this?
<data>
<name>Bob</name>
<widgit>1</widgit>
<widgit>2</widgit>
<widgit>3</widgit>
</data>
It doesnt seem that having 3 child elements named "widgit" under the parent named "data" would be correct. Afteral how would it get read back in correctly?
Any help or keyword that I could use for a search would be appreciated. Even a good book on the subject !
Thank you for your help !
Jack
|
|
|
|
|
It would be more like:
<data>
<name>Bob</name>
<widgits>
<widgit>1</widgit>
<widgit>2</widgit>
<widgit>3</widgit>
</widgits>
</data>
since the widgets element would serve as a container (array) of widgets.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Oh I got lagged. Serious lag, 11 minutes worth.
led mike
|
|
|
|
|
Well, at least we are on the same page for once!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Jack 2927 wrote: It doesnt seem that having 3 child elements named "widgit" under the parent named "data" would be correct.
Yes basically it is. Sometimes people or systems prefer a more verbose representation but the same basic principle applies:
<data>
<name>Bob</name>
<widgetList>
<widgit>1</widgit>
<widgit>2</widgit>
<widgit>3</widgit>
</widgetList>
</data>
led mike
|
|
|
|
|
sir plz suggest me how to read xml using javascript?
|
|
|
|
|
The browser must supply support for working with XML. In Internet Explorer you can use MSXML and the XML DOM. The internet is full of javascript examples for that subject. I don't know how the other browsers support it. Sites like TopXML, W3Schools, Mozilla and others probably have all sorts of information on the subject.
led mike
|
|
|
|
|
Dear all,
I got an XML like this:
<colleagues>
<colleague branchid="NH" dept="IT">
<name>Aluis</name>
<email>tungdt@ssi.com.vn</email>
<phone areacode="02" ext="1604">123456789</phone>
<mobile>0983934645</mobile>
<fax></fax>
<comp ipaddress="192.168.2.5">IT11</comp>
</colleague>
...
</colleagues>
here is code that I load XML to DataGrid:
<code>
private void loadData(string xmlsource)
{
try {
// Initialize Component and other code here
// Create an XmlDataDocument object and read an XML
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml(xmlsource);
// Create a DataSet object and fill with the dataset
// of XmlDataDocument
this.colleagueList = new DataSet("Colleague List");
this.colleagueList = xmlDatadoc.DataSet;
// Attach dataset view to the Data Grid control
this.lstColleague.DataSource = this.colleagueList.DefaultViewManager;
this.lstColleague.NavigateTo(0, "colleague");
} catch(Exception e) {
throw e;
}
}
</code>
but all the attributes in <phone> node, and <comp> node were not showed.
Please help me how to display all information in one view...
Regards, </comp></phone>
|
|
|
|
|
Hi guys,
I create a xml file like this by program:
<condition>disp='1'</conditions>
<item>
<disp> 1 </disp>
<otheritem> f</otheritem>
<item>
<item>
<disp> 2 </disp>
<otheritem> w</otheritem>
<item>
<item>
<disp> 3 </disp>
<otheritem> w</otheritem>
<item>
I use xslt to transform this xml file to html.
But I don't want to show some items, such as, when disp='1', I don't want to show it to users.
In here, the condition is variational. Maybe it's disp!='4', maybe it's otheritem = '53g'.
when I show the items with xslt, how to filt these items?
<xsl:for-each select="/items/item[???]">
I try to add the condition to the xml file, and get it in the xslt. But it can't work normally. Can anyone give me any suggestions?
Thanks & regards.
=========================================
Make friends with you all.
My Blog, welcome
???????,????????
|
|
|
|
|
please help!!
I have a class which has three constructors say
class Person
{
Person(string name, int age, string address)
{
//all these value written to an xml file
}
Person(string name, int age, string address, string emailadress)
{
//all these value written to an xml file
}
Person(string name, DateTime dateOfBirth, bool isalive, DateTime dateofExpire)
{
//all these value written to an xml file
}
}
Now what I need to a make a common xml schema for these constructor value where I can represent these items. Please help!!!
Also I have one more problem in one of attribute of an xml item there is complex datatype say
< property id="status" title="Status" type="Choice" >
< choices>
< choice > Draft </choice>
< choice > Approved </choice>
< choice > Active </choice>
< /choices>
</property>
Where status is attribute of an xml element how can I represent this in an xmlschema
Thanx in advance
|
|
|
|
|
Hi,
I want to wite an application with c# .Can i save/reterive an image in/to xml file.Any body can help me with some code.Thanks
Shoukat
|
|
|
|
|
Look at this forum post[^]
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi all,
I have a XML (xsd designed/based). My client gave me the new version of XSD which modified than earlier one. He needs the xml to be generated on this XSD progammatically. So now the query is that Is there any tool using which i can migrate from one version to other version of XSD. when i put my old xml in that tool and new xsd then the output will be modified xml with may be dummy data. this new xml is supporting the new xsd of course!
If anybody can help me in this regard, please help me !!
Regards,
Jitin
|
|
|
|
|
coder_help wrote: If anybody can help me in this regard, please help me !!
You seem to be missing the aspect of conversion wherein something or someone must decide what data goes where. I doubt you will find any tool that will magically make that decision for you.
|
|
|
|
|
I transformed an XML file as follows:
**** original XML ****
<?xml version="1.0" encoding="utf-8"?>
<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<pages>
<ele0>
<pageName>Test</pageName>
</ele0>
</pages>
</Data>
******* Transformed XSL *****
<?xml version="1.0" encoding="utf-8"?>
<main-menu-list>
<pageName pageName="Test" />
</main-menu-list>
**** XSL ***
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<main-menu-list>
<xsl:for-each select="//Data/pages/*">
<xsl:element name="pageName">
<xsl:attribute name="pageName">
<xsl:value-of select="pageName"/>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</main-menu-list>
</xsl:template>
</xsl:stylesheet>
However, I would like to transform any XML document as above without naming a specific element/attribute.
I found this XSL for starters but am having difficulty representing the element value in the attribute:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="pageName">
<xsl:element name="{name()}">
<xsl:for-each select="@*">
<xsl:attribute name="{name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Any ideas?
|
|
|
|
|
I'm not sure I understand. You want to transform any element into an element of the same name with an attribute of the same name with the attribute value being the value of the child text node of the original element? I can't begin to understand what problem that solves but you need your match value to be "*" to have it transform "any" element.
|
|
|
|
|
My task is to create xml-files based on different schemas. The schema files are quite big approx 4000 rows. The contents of the files are stored in our database. I know how to validate, but I am puzzled with file creation process. I need information about how to solve it in a time efficient and flexible (schemas may change now and then) way. Is there a best practice way or are there support tools available? I use Visual studio as development platform.
thanks all
|
|
|
|
|
eroi wrote: My task is to create xml-files based on different schemas.
I do not understand your question. How can you create XML files based on schemas? A schema defines the structure of the XML but you also need a data source to generate an XML file don't you?
|
|
|
|
|
Something like the content of the following link is what I am trying to do: http://msdn2.microsoft.com/en-us/library/aa302296.aspx[^]
But I wonder if there are better/alternative ways. Today I create the file using the System.Xml.XmlDocument and adding elements and etc, but it is very time consuming. The content I pick up from our database.
/EROI
|
|
|
|
|
eroi wrote: but it is very time consuming.
What is time consuming?
led mike
|
|
|
|