|
Hi,
I am new to Xml language,Can anybody tell what will be output of a xml parser???
Thanks in advance.
Siddharth
|
|
|
|
|
There are two types of XML Parser Standards
1) DOM Parser - produces an in memory tree structure of XmlNode objects
2) SAX Parser - fires events during parsing
led mike
|
|
|
|
|
I am using NDFD service for wether data : http://www.weather.gov/forecasts/xml/
First i got error : underlaying connection closed.
its resolved after i puts
protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
System.Net.HttpWebRequest webRequest =
(System.Net.HttpWebRequest)base.GetWebRequest(uri);
webRequest.ProtocolVersion = HttpVersion.Version10;
webRequest.KeepAlive = false;
return webRequest;
}
But now in some cases its gives me error:
Unable to read data from the transport connection. Connection closed.
Plz.. can any one help me on this?
I m using ASP.Net 2.0
With Regards,
Mayank Prajapati
MCP, MCTS
Sr. Software Engineer
JCTWeb India
www.jctweb.com
|
|
|
|
|
it is possible to set xsl dynamically to xml ??
i.e for the same xml document, under some conditions to
change the xsl for the xml document.
i am using asp.net(vb.net)
thanks
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
XSL is XML
led mike
|
|
|
|
|
for sure xsl is xml..........
but its a (xml based)style sheet for the xml documents
just like the css file to the html page.
anyway i found the answer.
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
I think the question actually should be "it is possible to set xsl dynamically for xml document??"...
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
anyone know a method for binding the contents [not only title and description, but also the link tag contents ] in an RSS feed in my webpage without navigating to the url when click for more info
i have worked with one xslt script at
http://www.codeproject.com/soap/reallymostsimplesyndctn.asp
but it support only the title and description alog with navigating to the link url with thr stuff
my reqrment is:
stuff in the should support my webpage style
how we can do it
can u plzzz help me
thanx in advance
will uplzz supply ur emailid too
thanx.................
RIYAM HUSSAIN
Sr.SOFTWARE DEVELOPER
INFORPARK, KOCHIN
|
|
|
|
|
Hi,
i am newbie for XML (also to .Net). i heard from some one that we can use XML for sending / retrieving the data from the database.
for this we have to use HTTPWebRequet. HTTPwebrequest send/recive the data in xml string format.
but how can we do this??
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
This magic is called XMLHttpRequest.
Google for it, you'll see a plethora of tutorials.
Best regards,
- Dmitry.
-------------------------
Don't worry, be happy )
|
|
|
|
|
I am using vbscript to execute web services. Normally we can leave encoding out of the declaration line but we need it for chinese characters. When I load the xml from a stream (.LoadXML(...)) the encoding attribute gets stripped from the page declaration. If I try to load the file into the DOM it errors with no reason. Even If I try to set the declaration after loading it still does not showup in the XML Text.
<br />
<br />
<?xml version="1.0" encoding="gb2312" ?><br />
<br />
<br />
InputFolderXML = XMLTEXT from a file<br />
<br />
Set XmlInputDoc = CreateObject("Msxml2.FreeThreadedDOMDocument.4.0")<br />
LoadXmlResult = XmlInputDoc.loadXml(InputFolderXML)<br />
<br />
XmlInputDoc.CreateXmlDeclaration "1.0", "gb2312", Nothing<br />
<br />
<br />
Any Help will be greatly appreciated
Thanks
Joe
|
|
|
|
|
i have received an e-mail saying one of the users have rplied, and it gave link, but i dont see what the other user has posted on my reply
|
|
|
|
|
wrote: i dont see what the other user has posted on my reply
Probably he post some XML. The browser tries to interpret the XML tags like he does with HTML tags but since they have no meaning to the browser (in almost any case) the tags and its content are ignored. Asked the user that replied to you to either replace the "<" characters with "<" or check the "Ignore HTML tags in this message" beneath the smilies. If you do not want to wait till he does either of them, you should be able to read the answer by looking at the source code of the page.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I am using MSXML and prior to sending a XML (IXMLDOMDocument2*) through to a server, I need to strip out the CR's and LF's or just the CR's (0x09) from the XML file to send. How can I do this please?
|
|
|
|
|
did you try doc->preserveWhiteSpace(VARIANT_FALSE) ?
led mike
|
|
|
|
|
Yes. But that still leaves the CR's i.e. 0x0d! The document being loaded from disk has been canonalised ( C14N ) and doesn't have the CR's but as soon as it is loaded into my IXMLDomDocument2 object they are back. I have the following settings set:
put_async( VARIANT_FALSE )
put_validateOnParse(VARIANT_TRUE)
put_resolveExternals(VARIANT_FALSE)
put_preserveWhiteSpace(VARIANT_TRUE)
I would appreciate anyones advise on this.
|
|
|
|
|
Andy H wrote: put_preserveWhiteSpace(VARIANT_TRUE)
VARIANT_TRUE != VARIANT_FALSE sigh:
led mike
|
|
|
|
|
What I meant that I had tried set preserveWhiteSpace to VARIANT_TRUE. This does indeed get rid of the WhiteSpace but I still have CR-LF's i.e. I have:
0D 0A 09 09
Because the xml file saved to disk has been C14N'ed then when loaded into my IXMLDOMDocument2 object for transmission the signle LF's i.e. 0A have been converted back into CR-LF's i.e. OD OA pairs.
What I want to know is how can I load the XML file into my IXMLDOMDocument2 object without it changing it in any way?
|
|
|
|
|
Hi All,
Can anyone tell me if I can import two XSD's at the same time in my WSDL's
<types> section? if yes, how do i do it?
Thanks
|
|
|
|
|
Inside the types section define a schema that imports the two schemas.
<wsdl:types>
<xsd:schema>
<xsd:import namespace="..." schemaLocation="..." />
<xsd:import namespace="..." schemaLocation="..." />
...
</xsd:schema>
</wsdl:types>
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks for the information provided.
We have already tried the above mentioned suggestion. It doesnt work for us. It says the below error.
Port 'PreBpelService83Port' can not be imported. PortType 'PreBpelService83' can not be imported. The http://schemas.xmlsoap.org/wsdl/:operation 'process' was ignored
Any help on this is appreciated.
Thanks
|
|
|
|
|
Subramaniam s.V. wrote: It says the below error.
Who is it?
Subramaniam s.V. wrote: Port 'PreBpelService83Port' can not be imported. PortType 'PreBpelService83' can not be imported. The http://schemas.xmlsoap.org/wsdl/:operation 'process' was ignored
Are you sure you're trying to import XML Schema documents? The error complains about not being able to import WSDL elements.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Take a look at the classes in the System.Xml namespace (especially XmlDocument and/or XmlTextWriter ). Their documentation and the continuative links contain many useful examples.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I'm new to XML and have a simple document to parse.
<?xml version="1.0" encoding="UTF-8"?>
<Email>
<Email_Cfg>
<Interface>SMTP</Interface>
<ServerName>Company-server.corp</ServerName>
<ServerAddress>10.10.0.230</ServerAddress>
<MailFrom>Fred@gmail.com</MailFrom>
</Email_Cfg>
</Email>
I have tried the following. You can ignore the trace statements.
try
{
CWTRACE(TRC_DETAIL,("Parsing document!"));
//Parse the XML using DOM parser
XercesDOMParser * parser = new XercesDOMParser;
parser->parse(pathName);
DOMDocument * doc = parser->getDocument();
//Get the root element
DOMElement * docEle = doc->getDocumentElement();
DOMNodeList * nl = docEle->getElementsByTagName(L"Email_Cfg");
int iCnt = nl->getLength();
CWTRACE(TRC_DETAIL,("Number of nodes in Email_Cfg: '%d'", iCnt));
DOMNode * node = nl->item(0);
char * s = XMLString::transcode(node->getNodeName());
CWTRACE(TRC_DETAIL,("First Node Name: '%s'", s));
XMLString::release(&s);
DOMNodeList * nl1 = node->getChildNodes();
iCnt = nl1->getLength();
CWTRACE(TRC_DETAIL,("Number of child nodes in Email_Cfg: '%d'", iCnt));
DOMNode * node2;
for (XMLSize_t x = 0; x < nl1->getLength(); x++)
{
node2 = nl1->item(x);
s = XMLString::transcode(node2->getNodeName());
CWTRACE(TRC_DETAIL,("Child Node Name: '%s'", s));
if (strcmpi(s, "Interface") == 0)
{
char * t = XMLString::transcode(node2->getNodeValue());
CWTRACE(TRC_DETAIL,("Node Value: '%s'", t));
XMLString::release(&t);
}
XMLString::release(&s);
}
DOMElement * el;
for (XMLSize_t z = 0; z < nl1->getLength(); z++)
{
el = (DOMElement*)nl1->item(z);
s = XMLString::transcode(el->getTagName());
CWTRACE(TRC_DETAIL,("Element tag Name: '%s'", s));
if (strcmpi(s, "Interface") == 0)
{
char * t = XMLString::transcode(el->getAttribute(L"Interface"));
CWTRACE(TRC_DETAIL,("Interface Attribute Value: '%s'", t));
XMLString::release(&t);
DOMAttr * attr = el->getAttributeNode(L"Interface");
if (attr != NULL)
{
char * p = XMLString::transcode(attr->getName());
CWTRACE(TRC_DETAIL,("Attribute name: '%s'", p));
XMLString::release(&p);
p = XMLString::transcode(attr->getValue());
CWTRACE(TRC_DETAIL,("Attribute value: '%s'", p));
XMLString::release(&p);
}
}
XMLString::release(&s);
}
DOMNode * node1 = node->getFirstChild();
s = XMLString::transcode(node1->getNodeName());
CWTRACE(TRC_DETAIL,("Child Node Name: '%s'", s));
XMLString::release(&s);
iCnt = node1->getNodeType();
CWTRACE(TRC_DETAIL,("Node type: '%d'", iCnt));
s = XMLString::transcode(node1->getNodeValue());
CWTRACE(TRC_DETAIL,("Node Value: '%s'", s));
XMLString::release(&s);
}
catch(...)
{
CWTRACE(TRC_ERROR,("ERROR - Failed to parse email config file: '%s'", pathName));
CWTRACE_EXIT();
return -1;
}
Lots of trial and error, mostly error. I get the names of the nodes or elements, but can never get the values. How can I get the values?
Walter Falby
|
|
|
|
|