|
Did you get any tool, if you have any solution please share with me. i am also facing similar problem.
Thanks in advance
|
|
|
|
|
Also eager to hear any solution to this..
|
|
|
|
|
It's extremely unfortunate.
Obviously, there is severe lack of such a wonderful tool
I wish XML Spy could provide this kind of feature ...
|
|
|
|
|
I am a newbie to xml data manipulation.
I have Pocket PC Creations software and have created an inspection application.
I can export in XML, HTML, Excel as well. (here is a link to the product specifics):
http://www.pocketpccreations.com/skills/lecture.asp?CourseID=4&LectureID=4&Page=7
I am trying to figure out a way to create a paragraph word report with the information gathered by the pocket pc.
Is it possible to incorporate the data from the exported data into an MS Word document? If it is, can you point me in a direction for help?
Jimdandy1956
|
|
|
|
|
I am reading in some XML using the below code. The problem is when i attempt to get out the values for each Item, i get the same values again, ie: Debug prints out
Code = A123
Quantity = 10
---
Code = A123
Quantity = 10
using (TextReader textReader = new StringReader(xml))
using (XmlReader xmlReader = new XmlTextReader(textReader))
{
XPathDocument xPathDocument = new XPathDocument(xmlReader);
XPathNavigator xPathNavigator = xPathDocument.CreateNavigator();
XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(xPathNavigator.NameTable);
xmlNamespaceManager.AddNamespace("ns", "OrderSchema");
XPathExpression xPathExpressionItems = xPathNavigator.Compile("//ns:Order//ns:Items");
xPathExpressionItems.SetContext(xmlNamespaceManager);
XPathNodeIterator xPathNodeIteratorItems = xPathNavigator.Select(xPathExpressionItems);
do
{
string code = xPathNodeIteratorItems.Current.SelectSingleNode("//ns:Code", xmlNamespaceManager).ToString();
string quantity = xPathNodeIteratorItems.Current.SelectSingleNode("//ns:Quantity", xmlNamespaceManager).ToString();
System.Diagnostics.Debug.WriteLine("code == " + code);
System.Diagnostics.Debug.WriteLine("quantity == " + quantity);
System.Diagnostics.Debug.WriteLine("----");
}
while (xPathNodeIteratorItems.MoveNext());
}
Heres the xml i am reading in:
<?xml version="1.0" encoding="UTF-8" ?>
<Order>
<Items>
<Item>
<Code>A123</Code>
<Quantity>10</Quantity>
</Item>
<Item>
<Code>A456</Code>
<Quantity>5</Quantity>
</Item>
</Items>
</Order>
Any ideas what i am doing wrong?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
The only thing that jumps out is that you use Current before calling MoveNext the first time - the documentation[^] says you need to call MoveNext before Current.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi Gareth-
Please check this method:
private void ReadXMLData()
{
XmlDocument xDoc=new XmlDocument();
xDoc.LoadXml("<?xml version=\"1.0\" encoding=\"UTF-8\" ?><Order><Items><Item><Code>A123</Code><Quantity>10</Quantity></Item><Item><Code>A456</Code><Quantity>5</Quantity></Item></Items></Order>");
XmlNodeList xNodeList = xDoc.GetElementsByTagName("Item");
for (Int16 iCount = 0; iCount < xNodeList.Count; iCount++)
{
Response.Write(xNodeList[iCount].ChildNodes.Item(0).InnerText+ "<br/>");
Response.Write(xNodeList[iCount].ChildNodes.Item(1).InnerText + "<br/>");
Response.Write("-----<br/>");
}
}
|
|
|
|
|
I've created the following XML Schema (not for production use, but to learn by doing).
Here's what is burning me at the moment:
The xs:element elements that refer to classes or properties are giving me warnings that "Type 'class' is not declared". I'm still learning this stuff, so I'd really appreciate it if someone could take a quick peek at it and advise me of the (probably obvious) problem in the code below.
Thanks,
Will
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://gantsoftwaresystems.com/classspec.xsd"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:element name="classDefs">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="classes">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="class" type="class"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="views">
<xs:complexType>
<xs:sequence>
<xs:element name="view" type="class"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="class">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="property" type="property"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="base" type="xs:string"/>
<xs:attribute name="hasImageUrl" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="property">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="alsoTriggerPropertyChanged">
<xs:complexType>
<xs:attribute name="propertyName" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="changesImageUrl" type="xs:boolean"/>
<xs:attribute name="imageUrlQStringParamName" type="xs:string"/>
<xs:attribute name="imageUrlOverridePropertyName" type="xs:string"/>
</xs:complexType>
</xs:schema>
|
|
|
|
|
You need to namespace qualify the type references - you declare them in your target namespace, but when you reference them, don't mention that namespace. You can either use explicit namespace references or (and this is easier) use your target namespace as the default namespace for the schema.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
i need some help on xml. i want to send an xml document to an xml web service using get method. but i didn't find any article, helping material. i did not use xml before. please help me.
thanx
amirzada
|
|
|
|
|
|
You want to 'send' an XML payload with a GET…an amusing concept. Look at the verbs we're using SEND, GET - they're not compatible. You want to use a POST method to send an XML document to a server.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
thanx for your help but now i get an exception when i try create an xml document it show that the body and html tag is not closed how can i handle can you help me please.
thanx
amirzada
|
|
|
|
|
More detail - where does the HTML come in - that's NOT XML.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have a tool called "Flat file to XML converter" to convert the text file information to XML file using the XSD template available. Text file contains employee details. Whenever a name with apostrphe(') comes the tool converts it as ' instead of '. So whenever the XML file is decoded to view, it is showing the name with '. Please help me in this.
To make any changes in the tool is not possible and no XSLT is available for the XML file. Only XSD is there. I need to validate this ' and replace it with ' Is it possible?
Only a change in XSD is allowed. No seperate application/tool to convert the XML is allowed.
Example:-
flat fle contains the name- O'NEIL, JOHN.
XML file after conversion - O 'NEIL, JOHN.
Output needed - O'NEIL, JOHN
|
|
|
|
|
Validation DOES NOT alter the input XML - it just tells you if it meets the Schema or not.
Why does it matter, anyway? Any conforming XML reader will convert the ' entity to an apostrophe when it reads it!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
But whenever a name with apostrophe comes the "flat file to XML" converter convert it to ' So the XML parser can't change it to apostrophe when it process it. What do i do to avoid it?
|
|
|
|
|
The XML parser will interpret the ' as an apostrophe and store it as such internally. The apostrophe is only converted to ' when written to the XML file.
The XML Standard[^] says that the apostrophe may be stored as ' to permit use in attribute values. By always translating an apostrophe to ' you make sure the apostrophe is always in a readable form.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
sorry friend, i meant whenever a name with apostrophe comes the "flat file to XML converter" converts it to &";apos instead of ' (please omit the double quotes). So the XML parser can't parse it to &apos.
|
|
|
|
|
Sounds like either the flat-files coming with entity encoding already done, or the converters doing the encoding twice. You can't fix that once you're in the XML domain - the original text might have been ' !
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Gives error access denied.
if i change MSXML2.serverXMLHTTP.4.0 to MSXML2.serverXMLHTTP then it gives error that soapaction.
here is my code
<%@language=Jscript%>
<%
var objSrvHTTP;
var objXMLSend;
var objXMLReceive;
var line="";
objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0");
objXMLSend = Server.CreateObject("Microsoft.XMLDOM");
objXMLReceive = Server.CreateObject("Microsoft.XMLDOM");
objXMLSend.async = false;
objFS = Server.CreateObject("Scripting.FileSystemObject");
ReadStream = objFS.OpenTextFile (Server.MapPath("BatchInput.xml"),1,false);
//ReadStream = objFS.OpenTextFile (Server.MapPath("Indulis.xml"),1,false);
var l="";
while (!ReadStream.AtEndOfStream) {
l=ReadStream.Readline();
line = line + l;
}
objSrvHTTP.setTimeouts(-1,-1,-1,-1) //This is important
//If this line is not there it will time out
//Before getting error back
objSrvHTTP.open ("POST","http://gems/GeneralLedgerTest/Update.asmx",false);
//objSrvHTTP.open ("POST","http://aura/GeneralLedger67/Update.asmx",false);
//objSrvHTTP.open ("POST","http://localhost/GeneralLedger/Update.asmx",false);
objSrvHTTP.setRequestHeader("Content-Type", "text/xml");
objSrvHTTP.setRequestHeader("SOAPAction","http://gems/Sample");
objSrvHTTP.send (line);
objXMLReceive = objSrvHTTP.responseXML;
Response.ContentType = "text/xml";
Response.Write (objXMLReceive.xml);
%>
my xml file is
<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<LoadGLRequest xmlns='http://www.gemsgov.com/Request'>
<GLTransfer xmlns='http://www.gemsgov.com/Request'>
<GLLoadSchema xmlns='http://tempuri.org/GLLoadSchema.xsd'>
<GLBatch ORGANIZATION='001' EXSource='OHR' Sequence='0'>
<BatchHeader BatchDate='091009' AreaCode='' Operator='OHR' Sequence='1'>
<BatchDetails Account='01-00-00-1010-1010-00000
' Amount='-1214762.58' Description='TEST' GLType='PR' Grant='' Project='' ProjectTask='' WorkorderNumber='' WorkCode='' TransactionDate='082109' AltSource='PR' AltDetail='0001' Sequence='2' />
<BatchDetails Account='01-00-00-1310-0000-00072
' Amount='6769.25
' Description='TEST2' TransactionDate='082109' AltSource='PR' AltDetail='0002' Sequence='3' />
</BatchHeader>
</GLBatch>
</GLLoadSchema>
</GLTransfer>
</LoadGLRequest>
</soap:Body>
</soap:Envelope>
Please let e know asap.
Hemaxi
|
|
|
|
|
Dear All,
I have a combination of classic ASP page and asp.net pages in the application. I am getting this error "Microsoft VBScript runtime error '800a01a8' Object required" on a asp page.
The error is coming from this code:
sRawHtml = Request("h_RawHTML")
Set xd = Server.CreateObject("MSXML2.DOMDocument")
Call xd.loadXML(CStr(sEncrypteXML))
set xel = xd.selectSingleNode("//WebSiteInformation")
xel.setAttribute "Site_HTML", CStr(sRawHTML)
Please tell me if I have written something wrong.
Thanks,
SP
|
|
|
|
|
Which line gets the error ? Is the MSXML2.DOMDocument class present ( I think it's part of IE, so it should be, but that seems to me to be what the problem is ).
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi, the error is on the last line (xel.setAttribute "Site_HTML", CStr(sRawHTML)).
this is working for some HTML code passing thru sRawHTML; and not working for some other HTMLs
|
|
|
|
|
And is it possible you could post examples of working and not-working HTML? Or is it secret?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|